From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jan Wieck <JanWieck(at)Yahoo(dot)com>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: GUC patch for Win32 |
Date: | 2003-05-08 20:40:25 |
Message-ID: | 200305082040.h48KeP324294@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Tom Lane wrote:
> Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:
> > If the user changes the config and HUP's the postmaster, postmaster
> > rereads the config and merges only those changes, that are changable at
> > runtime into it's status. From that status it creates the new file,
> > renames, HUP's the backends and they reread that file.
>
> That just moves any potential race conditions to another place, doesn't it?
> How's reading this file any safer than reading postgresql.conf? If the
> PM gets a second SIGHUP in quick succession, it could be rewriting the
> intermediate file while backends are trying to read it.
I have applied the following patch to improve the race condition. With
the old code, the nondefault setting file would be written after telling
the children to processing the nondefault setting file. Now, the
nondefaults file is written before sending the children the SIGHUP.
This leaves the only race condition as when a new child is reading the
the nondefaults file for the first time. I will make sure WIN32 doesn't
lose signals during startup time and processes the new version of the
file as well.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/plain | 993 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Ian Barwick | 2003-05-09 00:49:04 | psql: tab completion for \encoding |
Previous Message | Bruce Momjian | 2003-05-08 19:17:54 | Cleanup of shared memory attach |