Re: set_config with is_local parameter true escapes transaction boundaries - Mailing list pgsql-bugs

From Jobin Augustine
Subject Re: set_config with is_local parameter true escapes transaction boundaries
Date
Msg-id CAEpZXff27+1pXf5ngmbDm17Mh9wKrrAwGqpc-c-vA+-o01e=9w@mail.gmail.com
Whole thread Raw
In response to Re: set_config with is_local parameter true escapes transaction boundaries  (Ruslan Talpa <ruslan.talpa@subzero.cloud>)
List pgsql-bugs
Yes, The behaviour changes after the parameter are used for the first time. This could be a problem if the connection is reused (pool)
RESET/DISCARD also not bringing back the original behaviour.

--Please test this on a fresh connection
--Check the status before the first transaction
select current_setting('custom.a',true),current_setting('custom.a',true) is null, current_setting('custom.a',true)='';

--First transaction where the parameter is set at the transaction level
BEGIN;
SELECT set_config('custom.a', 'vv', true);
COMMIT;

--Reset
RESET ALL;
DISCARD ALL;

--Check the status after the first transaction
select current_setting('custom.a',true),current_setting('custom.a',true) is null, current_setting('custom.a',true)='';


-Jobin

pgsql-bugs by date:

Previous
From: Jeff Laing
Date:
Subject: RE: BUG #17747: Registry entry "Base Directory" is not populated if you only install Command-line tools
Next
From: "David G. Johnston"
Date:
Subject: Re: set_config with is_local parameter true escapes transaction boundaries