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

From Pavel Stehule
Subject Re: [HACKERS] proposal: session server side variables
Date
Msg-id CAFj8pRCViuf0WE8vxx+f9bW2tvY4VfkkEnguovfzWD9H1RNTgg@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


2017-01-04 17:30 GMT+01:00 Fabien COELHO <coelho@cri.ensmp.fr>:


Now we can this feature emulate with dblink, and there are patches in
commitfest based on background workers, and emulation will be cheaper.

I had not noticed that "background session" proposal. That's definitely an interesting feature to have for some use cases. Dblink implies a new connection I think, pretty expensive. I wish that the proposal would be language independent, like DB2 simple AUTONOMOUS declaration on a function. It seems quite heavily linked to PL/pgSQL right now.

Maybe year ago here was a discussion about autonomous transaction design - Robert proposed transaction scope - some like 'BEGIN AUTONOMOUS", I proposed function level. The syntax is not pretty important - this functionality is interesting - mainly for loging to tables - but there are risks - it again border transactional| untransactional - autonomous transactions are "untransactional" from outer transaction perspective - so some unwanted artefacts or risks are possible there - and application design should to respect it.

Regards

Pavel



 


--
Fabien.

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [HACKERS] [PATCH] PostgresNode.pm enhancements, pg_lsn helper,and some more recovery tests
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] Cluster wide option to control symbol case folding