Re: [GENERAL] Postgres 7.2 - Updating rows in cursor problem - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [GENERAL] Postgres 7.2 - Updating rows in cursor problem
Date
Msg-id 9337.1013706653@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] Postgres 7.2 - Updating rows in cursor problem  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List pgsql-hackers
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> This is a known issue. We should implement INSENSITIVE cursors
> to avoid this behavior. The keyword INSENSITIVE is there but isn't
> used long. I plan to implement this feature as the first step toward
> cross transaction cursors. Saving the xid and commandid in the
> portal or snapshot and restoring them at fetch(move) time would
> solve it.

For the moment I've arranged to save commandId in portals.  (xid isn't
needed since we don't have cross-transaction portals ... yet)

It occurs to me though that scanCommandId should not be part of the
xact.c global status at all.  It should be stored in heapscan and
indexscan state structs, instead.  I have been thinking about trying
to clean up the API for heapscans and indexscans, and maybe I'll see
if that can be done as part of that work.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Doug McNaught
Date:
Subject: Re: Upgrading to 7.2
Next
From: Chris Field
Date:
Subject: Re: Upgrading to 7.2