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

Re: GUC patch for Win32

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>,PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: GUC patch for Win32
Date: 2003-05-08 12:20:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Tom Lane wrote:
> >> Where exactly is the interlock to ensure that the new backend will end up
> >> with the correct settings if someone is changing the values at about
> >> the time of the fork?
> > Postmaster creates a new file, then does rename() to move it to the name
> > used by the backends.  It can't move it until the file is not in use.
> And?
> How exactly does that guarantee that the new backend will see an update
> occurring at about the same time?  I'm pretty sure that GUC is fired up
> before backends start listening to signals (and that's assuming the
> Windows port has a Unixy idea of signal response, which I seem to recall
> you telling me wasn't the case).

So far the postmaster is not multi-threaded, so it will not create a new
file and start a backend at the same time. Also, the rename() call is
supposed to be atomic. So there is allways a file, and it's either the
old or the new one, never something in between.


# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck(at)Yahoo(dot)com #

In response to


pgsql-patches by date

Next:From: Tom LaneDate: 2003-05-08 13:48:01
Subject: Re: GUC patch for Win32
Previous:From: Alvaro HerreraDate: 2003-05-08 12:06:20
Subject: Re: 2nd nested trasanctions supporting patch

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