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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #2712: could not fsync segment: Permission
Дата
Msg-id 26283.1161625754@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #2712: could not fsync segment: Permission  ("Peter Brant" <Peter.Brant@wicourts.gov>)
Ответы Re: BUG #2712: could not fsync segment: Permission  ("Peter Brant" <Peter.Brant@wicourts.gov>)
Re: BUG #2712: could not fsync segment: Permission  ("Magnus Hagander" <mha@sollentuna.net>)
Список pgsql-bugs
"Peter Brant" <Peter.Brant@wicourts.gov> writes:
> The same problem exists in 8.1 too.  See this thread
> http://archives.postgresql.org/pgsql-bugs/2006-04/msg00177.php
> Tom and Magnus tracked down a cause, but I don't think a fix was ever
> implemented.

Thomas seems to have two different issues there: the "could not rename
file" problem on the pg_xlog file is probably explained by the mechanism
we identified back then (and I'm not sure why no fix has been
installed), but there is no known reason other than antivirus software
for the "could not fsync" problem.

As for fixing the problem we do understand: ISTM it's just an awful idea
for pgrename and pgunlink to be willing to loop forever.  I think they
should time out and report the failure after some reasonable period
(say between 10 sec and a minute).

If we simply made that change, then the behavior when there's an idle
backend sitting on a filehandle for an old xlog segment would be that
checkpoints would fail at the MoveOfflineLogs stage, which would not
be fatal, but it'd be annoying.  We'd probably want to further tweak
InstallXLogFileSegment so that rename failure isn't an ERROR, at least
not on Windows.  (I think we could just make it return false, which'd
cause the caller to try to delete the xlog segment, which should work
even though rename doesn't.)

I'm not in a position to test this though.  Magnus or Bruce?

            regards, tom lane

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

Предыдущее
От: "Peter Brant"
Дата:
Сообщение: Re: BUG #2712: could not fsync segment: Permission
Следующее
От: "Thomas H."
Дата:
Сообщение: Re: BUG #2712: could not fsync segment: Permission