pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Ian Barwick <ian.barwick@2ndquadrant.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions
Date: Mon, 05 Aug 2019 15:02:15 -0400
Message-ID: <31812.1565031735@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoYR=vGy2Zrg4EpKYvL2JbHfGGU3wvgYvmr9fcQs6REyxg@mail.gmail.com>
References: <15032.1561403529@sss.pgh.pa.us>
	<20190624192014.GB2480@tamriel.snowman.net>
	<56aff4f3-dec8-f462-7feb-0938411b04a6@2ndquadrant.com>
	<CAA4eK1+JMm=tvx720y6jhD8pdzt=HdS1-TwQwkARib2pwK8EvQ@mail.gmail.com>
	<20190802222254.qsvqjtkwte464lu3@development>
	<31697.1564784856@sss.pgh.pa.us>
	<CAOuzzgqNyQM_z0biEEBVBK9WcaLmbCyWrd5xTdf-Oxb_9pntLA@mail.gmail.com>
	<20190802230011.dqokdhjptykopxxc@development>
	<20190805142139.GW29202@tamriel.snowman.net>
	<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>
	<CAOuzzgrPioEDqYS=iqfxmnD9NNEARGw2K08d83CvTUufZDxi0Q@mail.gmail.com>
	<CA+TgmoYR=vGy2Zrg4EpKYvL2JbHfGGU3wvgYvmr9fcQs6REyxg@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> But that's not the problem.  The problem is that ALTER SYSTEM modifies
> the first match instead of the last one, when it's a well-established
> principle that when reading from a PostgreSQL configuration file, the
> system adopts the value from the last match, not the first one. I
> admit that if somebody had thought to document what ALTER SYSTEM was
> doing, that person would probably have also realized that they had
> made a mistake in the code, and then they would have fixed the bug,
> and that would be great.

Well, actually, the existing code is perfectly clear about this:

    /* Search the list for an existing match (we assume there's only one) */

That assumption is fine *if* you grant that only ALTER SYSTEM itself
is authorized to write that file.  I think the real argument here
centers around who else is authorized to write the file, and when
and how.

In view of the point you made upthread that we explicitly made
pg.auto.conf a plain text file so that one could recover from
mistakes by hand-editing it, I think it's pretty silly to adopt
a position that external mods are disallowed.

			regards, tom lane





view thread (117+ messages)  latest in thread

Message-ID: <31812.1565031735@sss.pgh.pa.us>
Permalink:  ../31812.1565031735@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/31812.1565031735@sss.pgh.pa.us

 · 

reply

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, robertmhaas@gmail.com, sfrost@snowman.net, amit.kapila16@gmail.com, ian.barwick@2ndquadrant.com, tomas.vondra@2ndquadrant.com
  Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions
  In-Reply-To: <31812.1565031735@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