From: | Greg Smith <greg(at)2ndQuadrant(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: includeifexists in configuration file |
Date: | 2011-12-15 11:54:57 |
Message-ID: | 4EE9E011.4000301@2ndQuadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 12/12/2011 04:47 PM, Andrew Dunstan wrote:
> I have briefly looked at the code (but not tried to apply or build
> it), and modulo the naming issue it looks OK to me.
> Unless there is some other issue let's just get it applied. It looks
> like almost a no-brainer to me.
It isn't very fancy, but is does something people that can fit into a
couple of use-cases. Attached update has two changes to address the
suggestions I got, which closes everything I knew about with this one:
-It's now include_if_exists
-Files that are skipped are logged now
So current behavior:
$ tail -n 1 postgresql.conf
include 'missing.conf'
$ start
server starting
$ tail $PGLOG
LOG: could not open configuration file
"/home/gsmith/pgwork/data/include-exists/missing.conf": No such file or
directory
FATAL: configuration file
"/home/gsmith/pgwork/data/include-exists/postgresql.conf" contains errors
And new behavior:
$ vi $PGDATA/postgresql.conf
$ tail -n 1 postgresql.conf
include_if_exists 'missing.conf'
$ start
server starting
$ tail $PGLOG
LOG: skipping missing configuration file
"/home/gsmith/pgwork/data/include-exists/missing.conf"
LOG: database system was shut down at 2011-12-15 06:48:46 EST
LOG: database system is ready to accept connections
--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us
Attachment | Content-Type | Size |
---|---|---|
include-exists-v2.patch | text/x-patch | 5.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Smith | 2011-12-15 12:18:39 | Re: IDLE in transaction introspection |
Previous Message | Pavel Stehule | 2011-12-15 11:36:24 | Re: review: CHECK FUNCTION statement |