Re: committing inside cursor loop - Mailing list pgsql-hackers

From Ildus Kurbangaliev
Subject Re: committing inside cursor loop
Date
Msg-id 20180306154837.7a832ec0@wp.localdomain
Whole thread Raw
In response to committing inside cursor loop  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: committing inside cursor loop
List pgsql-hackers
On Tue, 20 Feb 2018 09:11:50 -0500
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:

> Here is a patch that allows COMMIT inside cursor loops in PL/pgSQL.
> As alluded to in earlier threads, this is done by converting such
> cursors to holdable automatically.  A special flag "auto-held" marks
> such cursors, so we know to clean them up on exceptions.
> 
> This is currently only for PL/pgSQL, but the same technique could be
> applied easily to other PLs.
> 

Hi,
The patch still applies, tests passed. The code looks nice,
documentation and tests are there.

Although as was discussed before it seems inconsistent without ROLLBACK
support. There was a little discussion about it, but no replies. Maybe
the status of the patch should be changed to 'Waiting on author' until
the end of discussion.

-- 
---
Ildus Kurbangaliev
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company


pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: inserts into partitioned table may cause crash
Next
From: Claudio Freire
Date:
Subject: Re: Faster inserts with mostly-monotonically increasing values