postgresql.auto.conf read from wrong directory - Mailing list pgsql-hackers

From Christoph Berg
Subject postgresql.auto.conf read from wrong directory
Date
Msg-id 20140506133431.GC10014@msgid.df7cb.de
Whole thread Raw
Responses Re: postgresql.auto.conf read from wrong directory  (Amit Kapila <amit.kapila16@gmail.com>)
Re: postgresql.auto.conf read from wrong directory  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
Hi,

if you split configuration and data by setting data_directory,
postgresql.auto.conf is writen to the data directory
(/var/lib/postgresql/9.4/main in Debian), but tried to be read from
the etc directory (/etc/postgresql/9.4/main).

One place to fix it would be in ProcessConfigFile in
src/backend/utils/misc/guc-file.l:162 by always setting
CallingFileName = NULL in src/backend/utils/misc/guc-file.l:162, but
that breaks later in AbsoluteConfigLocation() when data_directory is
NULL. (As the comment in ProcessConfigFile says.)

I'm not sure where to break that dependency loop - the fix itself
seems easy, just don't tell to look for postgresql.auto.conf next to
ConfigFileName, but in the data_directory.

Christoph
-- 
cb@df7cb.de | http://www.df7cb.de/



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: sb_alloc: a new memory allocator for PostgreSQL
Next
From: Tom Lane
Date:
Subject: Re: New pg_lsn type doesn't have hash/btree opclasses