Re: ALTER SYSTEM vs symlink - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: ALTER SYSTEM vs symlink
Date
Msg-id 20151102144302.GN3685@tamriel.snowman.net
Whole thread Raw
In response to Re: ALTER SYSTEM vs symlink  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: ALTER SYSTEM vs symlink  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
> > I don't know if this was discussed at the time ALTER SYSTEM was
> > implemented, but I have just discovered that if postgresql.auto.conf is
> > a symlink to a file elsewhere, ALTER SYSTEM will happily break that link
> > and write its own local copy. That strikes me as rather unfriendly. Why
> > not just truncate the file rather than unlink it as it's being
> > rewritten? Even if we don't want to do that a warning in the docs might
> > help users avoid the "mistake" I just made.
>
> Frankly, that behavior strikes me as a good idea.  There is no situation,
> IMV, where it's sane to try to put a symlink there.

I tend to agree with this.  Where a symlink makes sense for us are cases
where the configuration information is intentionally stored in the
correct directory structure (eg: /etc on Debian/Ubuntu and systems which
follow the FHS), and intended to be user-modifyable.  That's not the
case with ALTER SYSTEM.

What this request strikes me as asking for is the same as what I asked
for when this feature was originally going in- there should be a way to
disable it.  Allowing changes through ALTER SYSTEM which can result in
the system not being able to start is dangerous and confusing to many.

Thanks!

Stephen

pgsql-hackers by date:

Previous
From: "Shulgin, Oleksandr"
Date:
Subject: Re: pglogical_output - a general purpose logical decoding output plugin
Next
From: Andrew Dunstan
Date:
Subject: Re: ALTER SYSTEM vs symlink