Re: Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])

From: Greg Stark <stark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Andres Freund <andres(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila(at)huawei(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, pgsql-hackers(at)postgresql(dot)org, Josh Berkus <josh(at)agliodbs(dot)com>
Subject: Re: Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
Date: 2013-08-05 23:17:14
Message-ID: CAM-w4HOWE5bRxCZbVqHT4S62csu+OkiPJEMMSJLbo9arUzjNTg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 5, 2013 at 6:16 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> If it's file-per-GUC, then when two sessions try to write different GUCs,
> there is no conflict

Well it's not that there's no conflict. It's just that we don't detect
the conflict. If you raise shared_buffers and I calculate the optimal
work_mem based on the old shared_buffers and set work_mem I may well
set it too large. Or if I set multiple settings together and you set
one of them you'll undo my change and lose just part of my changes but
not stop me from setting the others inconsistently.

I think it's actually better to lose a whole set of changes than to
intermix two sets of changes in unpredictable ways. And I would
suggest instead of doing a rename we just create a second link leaving
behind the original link as well. That means you wouldn't be losing
the other changes entirely you would have the history of the settings
as they were briefly at least.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-08-06 00:05:17 Re: make --enable-depend the default
Previous Message Greg Stark 2013-08-05 22:56:16 Re: Unsafe GUCs and ALTER SYSTEM WAS: Re: ALTER SYSTEM SET