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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2712: could not fsync segment: Permission
Date: 2006-11-08 20:36:33
Message-ID: 27575.1163018193@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches

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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message David Green 2006-11-08 23:13:02 JDBC driver bug PreparedStatement.setNull(int,Types.BOOLEAN)
Previous Message aTz 2006-11-08 18:15:07 BUG #2744: pg_dump, ERROR: out of memory, Failed on request of size 270344621

Browse pgsql-patches by date

  From Date Subject
Next Message Guillaume Lelarge 2006-11-08 23:25:24 Re: [GENERAL] ISO week dates
Previous Message Brendan Jurd 2006-11-08 20:08:33 Error in from_char() for field 'D'?