Re: Symbolic link breaks for postgresql.auto.conf - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Symbolic link breaks for postgresql.auto.conf
Date
Msg-id 62388a6b-3d5e-011e-5549-ba0f3b505b3e@aklaver.com
Whole thread Raw
In response to Re: Symbolic link breaks for postgresql.auto.conf  (Vijaykumar Jain <vijaykumarjain.github@gmail.com>)
List pgsql-general
On 6/6/21 10:02 AM, Vijaykumar Jain wrote:
> Yes, I learnt it the hard way as well :) I made changes via the alter 
> system, and did a pg_restore, and the changes were lost  :)
> 
> use the alter system for ad hoc changes, but make sure those changes are 
> added back to the postgresql.conf file immediately (or however the main 
> conf file is managed).

I would suggest taking a look at 'includes':

https://www.postgresql.org/docs/13/config-setting.html#CONFIG-INCLUDES


> 
> 
> On Sun, 6 Jun 2021 at 22:17, Tom Lane <tgl@sss.pgh.pa.us 
> <mailto:tgl@sss.pgh.pa.us>> wrote:
> 
>     RAJAMOHAN <garajamohan@gmail.com <mailto:garajamohan@gmail.com>> writes:
>      > 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.
> 
>     This is not supported.  Don't do it.
> 
>     The right way to keep the hand-maintained config files outside the
>     data directory is not the way you've done it here, either.  It might
>     accidentally work, but the preferred way is to put "data_directory =
>     whatever" in postgresql.conf and then start the postmaster with -D
>     pointing at where the config files are.
> 
>     But in any case, postgresql.auto.conf is not hand-maintained; it
>     is part of the cluster data, so it belongs in the data directory.
> 
>                              regards, tom lane
> 
> 
> 
> 
> -- 
> Thanks,
> Vijay
> Mumbai, India


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Vijaykumar Jain
Date:
Subject: Re: Symbolic link breaks for postgresql.auto.conf
Next
From: Adrian Klaver
Date:
Subject: Re: Symbolic link breaks for postgresql.auto.conf