Hello all,
Can someone explain how postgresql.auto.conf file contents gets updated, when running an alter system statement followed by pg_reload_conf?
I am trying to keep a symbolic link for the postgresql.auto.conf outside the data directory. The link gets created but whenever I issue an alter system statement it gets broken.
The main reason for this symbolic link creation is to retain the parameter values associated with this cluster, because we will be copying the entire data directory from another server to this server from time to time for testing purposes.
And no issues with other files such as hba and postgresql.conf.
Operating System: Ubuntu 18.04.1 LTS
Postgresql : 12.7
Step1:
Created symbolic links and i am inside data directory
lrwxrwxrwx 1 postgres postgres 41 Jun 3 05:12 postgresql.conf -> /etc/postgresql/12/test1/postgresql.conf
lrwxrwxrwx 1 postgres postgres 37 Jun 3 05:12 pg_hba.conf -> /etc/postgresql/12/test1/pg_hba.conf
lrwxrwxrwx 1 postgres postgres 46 Jun 6 15:19 postgresql.auto.conf -> /etc/postgresql/12/test1/postgresql.auto.conf
Step2:
alter system set checkpoint_timeout='2min';select pg_reload_conf();
ALTER SYSTEM
pg_reload_conf
----------------
t
(1 row)
pg_reload_conf
----------------
t
(1 row)
Step3:
Symbolic link got broken
lrwxrwxrwx 1 postgres postgres 41 Jun 3 05:12 postgresql.conf -> /etc/postgresql/12/test1/postgresql.conf
lrwxrwxrwx 1 postgres postgres 37 Jun 3 05:12 pg_hba.conf -> /etc/postgresql/12/test1/pg_hba.conf
lrwxrwxrwx 1 postgres postgres 37 Jun 3 05:12 pg_hba.conf -> /etc/postgresql/12/test1/pg_hba.conf
lrwxrwxrwx 1 postgres postgres 46 Jun 6 15:19 postgresql.auto.conf
Thanks & Regards,
Rajamohan.J