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

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Peter Brant" <Peter(dot)Brant(at)wicourts(dot)gov>
Cc: "Thomas H(dot)" <me(at)alternize(dot)com>, <pgsql-bugs(at)postgresql(dot)org>, "Bruce Momjian" <bruce(at)momjian(dot)us>
Subject: Re: BUG #2712: could not fsync segment: Permission
Date: 2006-10-25 14:50:05
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCEA3583D@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches

> > 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?

I haven't reproduced this on my box. But if you can give me a patch to
try I can build binaries for Thomas to test, if he can do testing but
not building.

//Magnus

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas H. 2006-10-25 15:37:30 Re: BUG #2712: could not fsync segment: Permission
Previous Message Sokolov Yura 2006-10-25 14:33:23 BUG #2720: plpythonu with Python 2.5 crashes

Browse pgsql-patches by date

  From Date Subject
Next Message Thomas H. 2006-10-25 15:37:30 Re: BUG #2712: could not fsync segment: Permission
Previous Message Jaime Casanova 2006-10-25 11:07:25 Re: Tablespace for temporary objects and sort files