Re: [PATCHES] Fix "database is ready" race condition - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [PATCHES] Fix "database is ready" race condition
Date
Msg-id 20070207124141.GI11742@alvh.no-ip.org
Whole thread Raw
In response to Re: [PATCHES] Fix "database is ready" race condition  (Jim Nasby <decibel@decibel.org>)
List pgsql-hackers
Jim Nasby wrote:
> On Feb 5, 2007, at 8:19 AM, Tom Lane wrote:
> >"Simon Riggs" <simon@2ndquadrant.com> writes:
> >>My suggestions would be
> >>1. "Database system has completed recovery" and
> >>2. "Database system is ready to accept connections"
> >
> >The second was in fact the wording I had in mind, sorry for not being
> >clear.  As to the first, the question is whether a log message at
> >that specific point has any use.  It's not "completion of recovery",
> >exactly, since we go through that spot whether it's a normal startup
> >or  recovery (and there is another log message when we actually do
> >any WAL replay).  AFAICS it's a fairly randomly chosen place in a
> >long sequence of  Things That Must Happen.  Part of the reason Markus
> >is seeing a race  condition is that this isn't the last thing done
> >before the startup subprocess exits --- see BootstrapMain.  So I'm
> >for just getting rid of it.
> 
> It is useful to know if the database had to do recovery, though, and  
> if it did do recovery, it would be useful to know how long it took if  
> the subsequent startup took a real amount of time.

That's already logged elsewhere, so there's no loss of functionality.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From:
Date:
Subject: Re: Logging functions executed by queries in 8.2?
Next
From: Peter Eisentraut
Date:
Subject: Chatter on DROP SOMETHING IF EXISTS