Symbolic link breaks for postgresql.auto.conf
От | RAJAMOHAN |
---|---|
Тема | Symbolic link breaks for postgresql.auto.conf |
Дата | |
Msg-id | CAFzdntuKqBv9wYcKVHutJSTypG12z+2dPJZd4d7hnTeyzcuU5w@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Symbolic link breaks for postgresql.auto.conf
Re: Symbolic link breaks for postgresql.auto.conf |
Список | pgsql-general |
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
В списке pgsql-general по дате отправления: