From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Simon Riggs <simon(at)2ndQuadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Re: [COMMITTERS] pgsql: Start background writer during archive recovery. |
Date: | 2009-02-19 20:28:31 |
Message-ID: | 499DC0EF.9040603@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Tom Lane wrote:
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>> Tom Lane wrote:
>>> Maybe the postmaster should wait for startup process exit before
>>> deciding to open for business, instead of just a signal.
>
>> Not a bad idea. Although, there's nothing wrong with the current way
>> either. The startup process does a proc_exit(0) right after sending the
>> signal ATM, so there's no real work left at that point.
>
> The thing wrong with it is assuming that nothing interesting will happen
> during proc_exit(). We hang enough stuff on on_proc_exit hooks that
> that seems like a pretty shaky assumption.
I can't get too worried, given that proc_exit() is a very well-beaten
code path. Admittedly not so much for an auxiliary process, but that's
just a dumbed down version of what happens with a full-blown backend.
However I started looking into that idea anyway, and figured that it
does simplify the logic in postmaster.c quite a bit, so I think it's
worth doing on those grounds alone. Attached is a patch against CVS HEAD
and also against a snapshot before the recovery infra patch, for easier
reading. I'll give that some more testing and commit if I find no issues.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
wait-for-startup-to-die-1.patch | text/x-diff | 15.4 KB |
wait-for-startup-to-die-1-against-old-code.patch | text/x-diff | 13.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-02-19 20:32:45 | pgsql: Improve comments about semijoin implementation strategy, per a |
Previous Message | User Sas | 2009-02-19 18:44:24 | slony1-ctl - slony-ctl: Translation |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2009-02-19 20:33:40 | Re: graph representation of data structures in optimizer |
Previous Message | Adriano Lange | 2009-02-19 20:17:54 | Re: graph representation of data structures in optimizer |