Skip site navigation (1) Skip section navigation (2)

pgsql: Ensure pg_ctl behaves sanely when data directory is notspecifie

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Ensure pg_ctl behaves sanely when data directory is notspecifie
Date: 2012-06-12 02:47:41
Message-ID: E1SeH8v-00065z-O5@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Ensure pg_ctl behaves sanely when data directory is not specified.

Commit aaa6e1def292cdacb6b27088898793b1b879fedf introduced multiple hazards
in the case where pg_ctl is executed with neither a -D switch nor any
PGDATA environment variable.  It would dump core on machines which are
unforgiving about printf("%s", NULL), or failing that possibly give a
rather unhelpful complaint about being unable to execute "postgres -C",
rather than the logically prior complaint about not being told where the
data directory is.

Edmund Horner's report suggests that there is another, Windows-specific
hazard here, but I'm not the person to fix that; it would in any case only
be significant when trying to use a config-only PGDATA pointer.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/51e61b04f8040f627e7605594095b06c10582fd0

Modified Files
--------------
src/bin/pg_ctl/pg_ctl.c |    6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

pgsql-committers by date

Next:From: Robert HaasDate: 2012-06-12 13:54:19
Subject: pgsql: Copy-editing of release notes.
Previous:From: Tom LaneDate: 2012-06-12 01:56:06
Subject: pgsql: Fix pg_dump output to a named tar-file archive.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group