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

From: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
To: "'Alvaro Herrera'" <alvherre(at)2ndquadrant(dot)com>
Cc: "'Robert Haas'" <robertmhaas(at)gmail(dot)com>, "'Josh Berkus'" <josh(at)agliodbs(dot)com>, "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "'Magnus Hagander'" <magnus(at)hagander(dot)net>, "'Christopher Browne'" <cbbrowne(at)gmail(dot)com>, "'PostgreSQL-development'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal for Allow postgresql.conf values to be changed via SQL
Date: 2012-11-08 15:01:29
Message-ID: 006a01cdbdc1$ef739680$ce5ac380$@kapila@huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thursday, November 08, 2012 8:07 PM Alvaro Herrera wrote:
> Amit Kapila escribió:
>
> > 3. Two backends trying to write to .auto file
> > we can use ".auto.lock" as the the lock by trying to create it
> in
> > exclusive mode as the first step
> > of the command. If it already exists then backend needs to
> wait.
>
> So changing .auto settings would be nontransactional?

No, it should behave the way you explained below.
The points mentioned in above mail are just to explain the basic concept.

>The other way to
> define this would be to have a lock that you grab and keep until end of
> transaction, and the .auto.lock file is deleted if the transaction is
> aborted; so have the .auto.lock -> .auto rename only happen at
> transaction commit.

Is this behavior sane for Transaction block, as in transaction block some
other backend might need to wait
for little longer, if both issued a command to change config parameter?

IMO it is okay, as the usage of command to change config parameters inside a
transaction block would be less.

With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2012-11-08 15:18:07 Re: Proposal for Allow postgresql.conf values to be changed via SQL
Previous Message Atri Sharma 2012-11-08 14:53:11 Re: [v9.3] writable foreign tables