Hi,
is there a good reason to print the "database system is ready" message
in StartupXLOG() in xact.c? It has a) nothing to do with xlog and b)
opens a small race condition: the message gets printed, while it still
take some CPU cycles until the postmaster really gets the SIGCHLD signal
and sets StartupPID = 0. If you (or rather: an automated test program)
try to connect within this timespan, you get a "database is starting up"
error, which clearly contradicts the "is ready" message.
I admit this is not a real issue in the common case and only matters in
automated testing or some such. But in case this does not break
anything... (ereport is used in the reaper, so I guess it's fine to use
that in signal handlers). I'm not sure if the message is needed at all
in BS_XLOG_BOOTSTRAP mode. Probably it should better say something
different.
Patch attached.
Regards
Markus
Responses
pgsql-hackers by date
| Next: | From: Andrew Dunstan | Date: 2007-02-03 16:52:29 |
| Subject: Re: \copy (query) delimiter syntax error |
| Previous: | From: Simon Riggs | Date: 2007-02-03 09:57:46 |
| Subject: Re: Referential Integrity and SHARE locks |
pgsql-patches by date
| Next: | From: Andrew Dunstan | Date: 2007-02-03 16:52:29 |
| Subject: Re: \copy (query) delimiter syntax error |
| Previous: | From: Heikki Linnakangas | Date: 2007-02-03 15:57:39 |
| Subject: Re: [pgsql-patches] Recalculating OldestXmin in a long-running vacuum |