Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-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

pgsql-bugs by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group