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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #2712: could not fsync segment: Permission
Дата
Msg-id 27575.1163018193@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #2712: could not fsync segment: Permission  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
I wrote:
> 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 ...

Just for the archives: I looked into doing this, and realized that the
reason we use a lock here is that on platforms without working link()
we use rename() to emplace new WAL segments.  And rename() is defined
to unlink any existing file of the target name, which would be
completely unsafe to do.

On platforms with link() we could probably get away without a lock,
but I'm disinclined to introduce that much of a platform-specific
difference in behavior when we don't have to.

            regards, tom lane

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

Предыдущее
От: "JEAN-PIERRE PELLETIER"
Дата:
Сообщение: Re: ERROR: failed to build any 4-way joins SQL state: XX000, PostgreSQL
Следующее
От: "David Green"
Дата:
Сообщение: JDBC driver bug PreparedStatement.setNull(int,Types.BOOLEAN)