Re: BUG: postgresql.auto.conf location - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG: postgresql.auto.conf location
Date
Msg-id CAKFQuwY9sq-6ax-h=4a9XLib0Pu357vv3A6qzRoFFZFF91DHbQ@mail.gmail.com
Whole thread Raw
In response to BUG: postgresql.auto.conf location  (Alexandr Blinov <alexandr.blinov@mysky.com>)
List pgsql-bugs
On Wed, May 30, 2018 at 10:23 AM, Alexandr Blinov <alexandr.blinov@mysky.com> wrote:
Hello, team!

I’m not sure if this is a bug or not, but the behavior of the postgresql server somewhat confusing.

The postgresql server is started with following parameters:
/usr/lib/postgresql/9.5/bin/postgres -D /var/lib/postgresql/9.5/main -c config_file=/etc/postgresql/9.5/main/postgresql.conf
hba_file = '/etc/postgresql/9.5/main/pg_hba.conf'
ident_file = '/etc/postgresql/9.5/main/pg_ident.conf'

After that the following command is executed: ‘ALTER SYSTEM SET max_connections = xxx;’

File postgresql.auto.conf is be created at ‘data’ directory, although this is expected in the same directory as the main postgresql.conf file.

The behavior described is intended. 

For the reasons you note not every setting is a candidate to be set in this manner in every situation.

ALTER SYSTEM SET, like ALTER ROLE SET and ALTER DATABASE SET before it, persist its changes as data within the PGDATA directory.  As far as I know nothing you access via SQL will modify (in a controlled manner) the three "files" that you can specify on the postgres command line.  This seems generally sufficient if not desirable.

David J.


pgsql-bugs by date:

Previous
From: Alexandr Blinov
Date:
Subject: BUG: postgresql.auto.conf location
Next
From: Tom Lane
Date:
Subject: Re: BUG: postgresql.auto.conf location