Re: BUG #2712: could not fsync segment: Permission

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #2712: could not fsync segment: Permission
Дата
Msg-id 6460.1161821723@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #2712: could not fsync segment: Permission  ("Thomas H." <me@alternize.com>)
Ответы Re: BUG #2712: could not fsync segment: Permission  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
"Thomas H." <me@alternize.com> writes:
> it is defenitely the writer process that blocks the db. but in every case
> the writer process seems to fail to rename the file due to another
> postgresql still holding a filehandle to the very xlog file that should be
> renamed.

Right, all you need is a backend process that's made at least one xlog
write and then is left to sit idle for long enough that that xlog file
is due for recycling.

However, the fact that the writer process is stuck should not in itself
cause the DB to lock up.  I think what's really happening is that after
the writer process gets stuck, the remaining backends chew all the
available WAL, and then they need to create more WAL segments for
themselves, and the writer process is holding the ControlFileLock so
they can't.

It might be interesting to think about not requiring the ControlFileLock
to be held while making new WAL segments.  I think the only reason it
does that is to ensure that link/rename failure can be treated as a hard
error (because no one could have beat us to the filename), but we're
already having to back off that stance for Windows ...

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Thomas H."
Дата:
Сообщение: Re: BUG #2712: could not fsync segment: Permission
Следующее
От: ""
Дата:
Сообщение: BUG #2713: Restore and Backup (Error: 0xe46973)