Symbolic link breaks for postgresql.auto.conf

From: RAJAMOHAN <garajamohan(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Symbolic link breaks for postgresql.auto.conf
Date: 2021-06-06 16:00:50
Message-ID: CAFzdntuKqBv9wYcKVHutJSTypG12z+2dPJZd4d7hnTeyzcuU5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

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 46 Jun 6 15:19 postgresql.auto.conf

Thanks & Regards,
Rajamohan.J

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2021-06-06 16:13:59 Re: Symbolic link breaks for postgresql.auto.conf
Previous Message Achilleas Mantzios 2021-06-05 20:10:30 Re: Ideas for building a system that parses medical research publications/articles