Re: committing inside cursor loop

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Ildus Kurbangaliev <i(dot)kurbangaliev(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: committing inside cursor loop
Date: 2018-03-29 14:37:05
Message-ID: 87in9fm0df.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Peter" == Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:

>> So... what is a pl/* that does _not_ use pinned cursors for cursor
>> loops supposed to do in this case?

Peter> Other than maybe using pinned cursors, one would have to look at
Peter> the whole picture and see what makes sense.

Never mind, I was overlooking the obvious: explicitly specifying
CURSOR_OPT_HOLD is sufficient for me. (Can't really use pinned cursors
because they might not be unpinned fast enough due to timing of garbage
collection, which would lead to spurious errors.)

--
Andrew (irc:RhodiumToad)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2018-03-29 14:39:09 Re: Allow workers to override datallowconn
Previous Message Daniel Verite 2018-03-29 14:30:00 Re: csv format for psql