Re: [HACKERS] proposal: session server side variables - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: [HACKERS] proposal: session server side variables
Date
Msg-id CAMsr+YGigrp9H3ari_Q55c4XAVRVYv7orkP+XQLNEhdWaRHRxQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] proposal: session server side variables  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
On 5 January 2017 at 01:49, Fabien COELHO <coelho@cri.ensmp.fr> wrote:
>
>> ok understand
>
>
> Good. So we seem to agree that GUCS are transactional?

No. We don't agree. They aren't.

The effects of SET LOCAL are reverted whether you commit or rollback.

The effects of SET SESSION are never reverted, whether you commit or roll back.

craig=> SET x.s = 'x';
SET
craig=> BEGIN;
BEGIN
craig=> SET LOCAL x.s = 'y';
SET
craig=> COMMIT;
COMMIT
craig=> SHOW x.s;x.s
-----x
(1 row)

There are simply different scopes, one of which is the transaction scope.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Vitaly Burovoy
Date:
Subject: Re: [HACKERS] identity columns
Next
From: Craig Ringer
Date:
Subject: Re: [HACKERS] proposal: session server side variables