Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Ian Barwick <ian(dot)barwick(at)2ndquadrant(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions
Date: 2019-08-03 00:13:49
Message-ID: CAOuzzgojSozLC5bTM+qfrPWiaBZX92jSrtqifBw_HSRRV5LEAw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greetings,

On Fri, Aug 2, 2019 at 19:36 Ian Barwick <ian(dot)barwick(at)2ndquadrant(dot)com>
wrote:

> On 8/3/19 8:24 AM, Andres Freund wrote:
> > Hi,
> >
> > On 2019-08-03 08:22:29 +0900, Ian Barwick wrote:
> >> What I came up with shoehorned a stripped-down version of the backend
> >> config parser into fe_utils and provides a function to modify
> pg.auto.conf
> >> in much the same way ALTER SYSTEM does, but with only the basic syntax
> >> checking provided by the parser of course. And for completeness a
> >> client utility which can be called by scripts etc.
> >
> >> I can clean it up and submit it later for reference (got distracted by
> other things
> >> recently) though I don't think it's a particularly good solution due to
> the
> >> lack of actual checks for the provided GUCSs (and the implementation
> >> is ugly anyway); something like what Andres suggests below would be far
> better.
> >
> > I think my main problem with that is that it duplicates a nontrivial
> > amount of code.
>
> That is indeed part of the ugliness of the implementation.

I agree that duplicate code isn’t good- the goal would be to eliminate the
duplication by having it be common code instead of duplicated. We have
other code that’s common to the frontend and backend and I don’t doubt that
we will have more going forward...

Thanks,

Stephen

>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2019-08-03 00:27:25 Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions
Previous Message Ashwin Agrawal 2019-08-02 23:56:22 Re: Remove HeapTuple and Buffer dependency for predicate locking functions