From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ian Barwick <ian.barwick@2ndquadrant.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions
Date: Tue, 06 Aug 2019 15:57:03 -0400
Message-ID: <5879.1565121423@sss.pgh.pa.us> (raw)
In-Reply-To: <54620b18-60b7-4b9b-7d1d-90a6464ab333@2ndquadrant.com>
References: <CA+Tgmoatso2sR=_LSSR443YjAfvQ48zpbYYVYQUHVMSoxsrJ9g@mail.gmail.com>
<20190805172935.GK29202@tamriel.snowman.net>
<CA+TgmoZmSQCta7eN_Y2+U4LthMxcutGB+YXs+0-i6ND2JY0TRA@mail.gmail.com>
<30179.1565029753@sss.pgh.pa.us>
<CA+TgmoYEQyLE8Mtgko9-WSVWm=hLNGi3FO4xNLTrLpwi2GgPHw@mail.gmail.com>
<30823.1565030571@sss.pgh.pa.us>
<CA+TgmobRpgiqCZ_FMUeDW4RM1W+RzT4HA2xSQy=QMcfv=X47jw@mail.gmail.com>
<32103.1565032053@sss.pgh.pa.us>
<20190806005225.GM29202@tamriel.snowman.net>
<6cba0dff-485b-6781-d659-0a376b966c89@2ndquadrant.com>
<20190806021616.GP29202@tamriel.snowman.net>
<54620b18-60b7-4b9b-7d1d-90a6464ab333@2ndquadrant.com>
Ian Barwick <ian.barwick@2ndquadrant.com> writes:
> On 8/6/19 11:16 AM, Stephen Frost wrote:
>>> Erm, those are duplicates though and we're saying that ALTER SYSTEM
>>> removes those... Seems like we should be normalizing the file to be
>>> consistent in this regard too.
> True. (Switches brain on)... Ah yes, with the patch previously provided
> by Tom, it seems to be just a case of replacing "strcmp" with "guc_name_compare"
> to match the existing string; the name will be rewritten with the value provided
> to ALTER SYSTEM, which will be normalized to lower case anyway.
Good catch.
>>> I dislike the special-casing of ALTER SYSTEM here, where we're basically
>>> saying that only ALTER SYSTEM is allowed to do this cleanup and that if
>>> such cleanup is wanted then ALTER SYSTEM must be run.
> This is just saying what ALTER SYSTEM will do, which IMHO we should describe
> somewhere. Initially when I stated working with pg.auto.conf I had
> my application append a comment line to show where the entries came from,
> but not having any idea how pg.auto.conf was modified at that point, I was
> wondering why the comment subsequently disappeared. Perusing the source code has
> explained that for me, but would be mighty useful to document that.
I feel fairly resistant to making the config.sgml explanation much longer
than what I wrote. That chapter is material that every Postgres DBA has
to absorb, so we should *not* be burdening it with stuff that few people
need to know.
Perhaps we could put some of these details into the Notes section of the
ALTER SYSTEM ref page. But I wonder how much of this is needed at all.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, ian.barwick@2ndquadrant.com, sfrost@snowman.net, robertmhaas@gmail.com, tomas.vondra@2ndquadrant.com, amit.kapila16@gmail.com
Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions
In-Reply-To: <5879.1565121423@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox