Re: tie user processes to postmaster was:(Re: [HACKERS] scheduler in core) - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: tie user processes to postmaster was:(Re: [HACKERS] scheduler in core)
Date
Msg-id 20100223143413.GA3672@alvh.no-ip.org
Whole thread Raw
In response to Re: tie user processes to postmaster was:(Re: [HACKERS] scheduler in core)  (Dimitri Fontaine <dfontaine@hi-media.com>)
List pgsql-hackers
Dimitri Fontaine wrote:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
> > Alvaro Herrera <alvherre@commandprompt.com> writes:
> >> Regarding hooks or events, I think postmaster should be kept simple:
> >> launch at start, reset at crash recovery, kill at stop.
> >
> > This is exactly why I think the whole proposal is a nonstarter.  It is
> > necessarily pushing more complexity into the postmaster, which means
> > an overall reduction in system reliability.
> 
> I was under the illusion that having a separate "supervisor" process
> child of postmaster to care about the user daemons would protect
> postmaster itself. At least the only thing it'd have to do is start a
> new child. Then let it care.

The problem I have with this design is that those processes are then not
direct children of postmaster itself, which is a problem when it wants
them to stop and such.  (This is why autovacuum workers are started by
postmaster and not by the launcher directly.  If I knew of a way to make
it work reliably, I wouldn't have bothered with that signalling
mechanism, which is quite fragile and gets its fair share of bug
reports.)

(Hmm, but then, autovacuum workers are backends and so they need to be
more closely linked to postmaster.  These other processes needn't be.)

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


pgsql-hackers by date:

Previous
From: Csaba Nagy
Date:
Subject: Re: A thought on Index Organized Tables
Next
From: Bruce Momjian
Date:
Subject: Re: Issues for named/mixed function notation patch