pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ian Barwick <ian.barwick@2ndquadrant.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions
Date: Wed, 19 Jun 2019 13:39:05 +0900
Message-ID: <75425921-0829-e84a-392e-168081dac6e7@2ndquadrant.com> (raw)
In-Reply-To: <CAA4eK1+gOhcqPdRVUJDLrrZ=oX+dG9e+0TH417F3OazPZAmQEA@mail.gmail.com>
References: <aed6cc9f-98f3-2693-ac81-52bb0052307e@2ndquadrant.com>
	<20190614160835.GF2480@tamriel.snowman.net>
	<CAA4eK1JW9UfLOtMEJq5b_YcogbWdxzAGUzNi72F2Xx4r1_h6QA@mail.gmail.com>
	<20190616171610.GO2480@tamriel.snowman.net>
	<27dc9f8d-8d8f-9dd1-0494-5d8bd2f49a45@2ndquadrant.com>
	<CAA4eK1+gOhcqPdRVUJDLrrZ=oX+dG9e+0TH417F3OazPZAmQEA@mail.gmail.com>

On 6/19/19 12:46 PM, Amit Kapila wrote:
> On Mon, Jun 17, 2019 at 8:20 PM Ian Barwick <ian.barwick@2ndquadrant.com> wrote:
>> On 6/15/19 1:08 AM, Stephen Frost wrote:
>>   > * Amit Kapila (amit.kapila16@gmail.com) wrote:
>>   >> Right.  I think if possible, it should use existing infrastructure to
>>   >> write to postgresql.auto.conf rather than inventing a new way to
>>   >> change it.  Apart from this issue, if we support multiple ways to edit
>>   >> postgresql.auto.conf, we might end up with more problems like this in
>>   >> the future where one system is not aware of the way file being edited
>>   >> by another system.
>>   >
>>   > I agere that there should have been some effort put into making the way
>>   > ALTER SYSTEM is modified be consistent between the backend and utilities
>>   > like pg_basebackup (which would also help third party tools understand
>>   > how a non-backend application should be modifying the file).
>>
>> Did you mean to say "the way postgresql.auto.conf is modified"?
>>
> 
> Yes, that is what we are discussing here.  I think what we can do here
> is to extract the functionality to set the parameter in .auto.conf
> from AlterSystemSetConfigFile and expose it via a function that takes
> (option_name, value) as a parameter.

Yup, I was just considering what's involved there, will reply to another
mail in the thread on that.

> Then we can expose it via some
> SQL function like set_auto_config (similar to what we have now for
> set_config/set_config_by_name).  I think if we have something like
> that then pg_basebackup or any other utility can use it in a
> consistent way.

Umm, but the point is here, the server will *not* be running at this point,
so calling an SQL function is out of the question. And if the server
is running, then you just execute "ALTER SYSTEM".


Regards

Ian Barwick

-- 
  Ian Barwick                   https://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services





view thread (117+ messages)  latest in thread

Message-ID: <75425921-0829-e84a-392e-168081dac6e7@2ndquadrant.com>
Permalink:  ../75425921-0829-e84a-392e-168081dac6e7@2ndquadrant.com/
Also on:    postgresql.org/message-id/75425921-0829-e84a-392e-168081dac6e7@2ndquadrant.com

 · 

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: ian.barwick@2ndquadrant.com, amit.kapila16@gmail.com, sfrost@snowman.net
  Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions
  In-Reply-To: <75425921-0829-e84a-392e-168081dac6e7@2ndquadrant.com>

* 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