Re: SET TRANSACTION in PL/pgSQL

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SET TRANSACTION in PL/pgSQL
Date: 2018-04-04 17:53:52
Message-ID: a5ab7971-2041-fd25-04e7-a25d5a0d0872@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03/29/2018 06:30 PM, Peter Eisentraut wrote:
> On 3/15/18 17:49, Alexander Korotkov wrote:
>> I didn't dig deeply into this subject.  But should we rather teach SPI
>> to execute
>> utility statements without taking snapshot when not necessary.  That seems
>> like what executor do for client provided queries.  And that seems a bit
>> unlogical
>> that SPI behaves differently.
>
> Here is the same patch rewritten using SPI, using the new no_snapshots
> facility recently introduced.
>

Yeah, doing that using SPI seems much cleaner and more like the rest of
the commands. Most of the patch is boilerplate to support the grammar,
and the one interesting piece exec_stmt_set seems fine to me.

Barring any objections, I'll mark it as RFC tomorrow morning.

regards

--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-04-04 17:54:59 Re: some last patches breaks plan cache
Previous Message Tom Lane 2018-04-04 17:51:56 Re: Add support for printing/reading MergeAction nodes