Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

From: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "'Greg Stark'" <stark(at)mit(dot)edu>
Cc: "'Greg Smith'" <greg(at)2ndquadrant(dot)com>, "'Andres Freund'" <andres(at)2ndquadrant(dot)com>, "'Boszormenyi Zoltan'" <zb(at)cybertec(dot)at>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]
Date: 2013-03-13 03:14:02
Message-ID: 001201ce1f98$d0a000c0$71e00240$@kapila@huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tuesday, March 12, 2013 9:37 PM Tom Lane wrote:
> Greg Stark <stark(at)mit(dot)edu> writes:
> > As Craig intimated, the minimal grammar impact would be simply
>
> > BEGIN;
> > set persistent maintenance_work_mem='2GB';
> > set persistent work_mem='2GB';
> > COMMIT;
>
> > Sending the sighup at transaction end seems like a fairly safe thing
> > to do too. It's hard to imagine it failing and if it did the worst
> > case would be that other backends would still have the old values
> too.
>
> This would only be sane if we also postponed writing the file until
> commit. I don't know what is in the patch at the moment, but I
> remember
> that we had talked of executing the file write immediately when SET
> PERSISTENT is issued.

Currently the patch handles it by executing the file write immediately when
SET
PERSISTENT is issued.
You have pointed at that time it's better to write file immediately as if we
postpone
it to commit time, it can have some other complications.

The only doubt I have in doing pg_reload_conf() is about the point raised by
Fujii Masao yesterday,
that is it will load all other configurations apart from what had been
changed by SET PERSISTENT.
Are you okay with it, if we implement this and document such behavior
clearly?

With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2013-03-13 06:33:04 Re: Enabling Checksums
Previous Message Tom Lane 2013-03-13 02:03:56 Re: leaking lots of unreferenced inodes (pg_xlog files?), maybe after moving tables and indexes to tablespace on different volume