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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Thomas H(dot)" <me(at)alternize(dot)com>
Cc: "Magnus Hagander" <mha(at)sollentuna(dot)net>, 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-26 00:15:23
Message-ID: 6460.1161821723@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches

"Thomas H." <me(at)alternize(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message postgres 2006-10-26 01:00:00 BUG #2722: DBD::Pg v1.49 quoting generate warning
Previous Message Thomas H. 2006-10-25 23:53:41 Re: BUG #2712: could not fsync segment: Permission

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-10-26 13:19:18 Re: Tablespace for temporary objects and sort files
Previous Message Thomas H. 2006-10-25 23:53:41 Re: BUG #2712: could not fsync segment: Permission