Re: [PATCH] Cleanup of GUC units code - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [PATCH] Cleanup of GUC units code
Date
Msg-id 20080903201946.GI4114@alvh.no-ip.org
Whole thread Raw
In response to Re: [PATCH] Cleanup of GUC units code  (Hannu Krosing <hannu@2ndQuadrant.com>)
List pgsql-hackers
Hannu Krosing escribió:
> On Wed, 2008-09-03 at 13:48 -0400, Alvaro Herrera wrote:

> > I think the energy wasted in this discussion would be better spent in
> > working a the check-the-config-file feature.
> 
> What kind of checks do you have in mind. Would this be something that
> works at restart, does the check and continues with old settings if new
> file would not load ?

This was discussed in some other thread.  No, the idea is that before
you do a reload, you run some function or invoke postmaster with certain
arguments, and it checks the config file and it says "this is OK" or
"there are errors here and here".  The check can be run even if the
server is already running.  That way you can just run it just before a
reload or restart.


> > That would equally solve
> > this problem, as well as many others.
> 
> AFAIK the config file is checked now, and if the check fails, the
> database won't start.

... which is not ideal.  Obviously it doesn't make much sense to run the
check if the server is already down, because you'll immediately know
that it won't come up just by trying to start it up.

(However, maybe it would be better for the init script to run the check
anyway, and report the error to stderr where the user running the script
can read it directly instead of having to go check the postmaster log
which could be sitting somewhere else.)

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


pgsql-hackers by date:

Previous
From: Joshua Drake
Date:
Subject: Re: [PATCH] Cleanup of GUC units code
Next
From: "Kevin Grittner"
Date:
Subject: Re: IN vs EXISTS equivalence