pgsql: Keep rs_startblock the same during heap_rescan, so that a rescan

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Keep rs_startblock the same during heap_rescan, so that a rescan
Date: 2009-06-10 18:54:23
Message-ID: 20090610185423.BBCD075331E@cvs.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Keep rs_startblock the same during heap_rescan, so that a rescan of a SeqScan
node starts from the same place as the first scan did. This avoids surprising
behavior of scrollable and WITH HOLD cursors, as seen in Mark Kirkwood's bug
report of yesterday.

It's not entirely clear whether a rescan should be forced to drop out of the
syncscan mode, but for the moment I left the code behaving the same on that
point. Any change there would only be a performance and not a correctness
issue, anyway.

Back-patch to 8.3, since the unstable behavior was created by the syncscan
patch.

Tags:
----
REL8_3_STABLE

Modified Files:
--------------
pgsql/src/backend/access/heap:
heapam.c (r1.249.2.4 -> r1.249.2.5)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/heap/heapam.c?r1=1.249.2.4&r2=1.249.2.5)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2009-06-10 19:00:37 pgsql: Improve capitalization and punctuation in recently added GiST
Previous Message Tom Lane 2009-06-10 18:54:17 pgsql: Keep rs_startblock the same during heap_rescan, so that a rescan