From: | alvherre(at)postgresql(dot)org (Alvaro Herrera) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Ensure that a cursor has an immutable snapshot throughout its |
Date: | 2009-10-02 17:57:30 |
Message-ID: | 20091002175730.5F1F3753FB7@cvs.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
Ensure that a cursor has an immutable snapshot throughout its lifespan.
The old coding was using a regular snapshot, referenced elsewhere, that was
subject to having its command counter updated. Fix by creating a private copy
of the snapshot exclusively for the cursor.
Backpatch to 8.4, which is when the bug was introduced during the snapshot
management rewrite.
Modified Files:
--------------
pgsql/src/backend/commands:
portalcmds.c (r1.79 -> r1.80)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/portalcmds.c?r1=1.79&r2=1.80)
pgsql/src/backend/executor:
spi.c (r1.208 -> r1.209)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/spi.c?r1=1.208&r2=1.209)
pgsql/src/backend/utils/time:
snapmgr.c (r1.10 -> r1.11)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/time/snapmgr.c?r1=1.10&r2=1.11)
pgsql/src/include/utils:
snapmgr.h (r1.5 -> r1.6)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/snapmgr.h?r1=1.5&r2=1.6)
pgsql/src/test/regress/expected:
portals.out (r1.21 -> r1.22)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/portals.out?r1=1.21&r2=1.22)
pgsql/src/test/regress/sql:
portals.sql (r1.16 -> r1.17)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/portals.sql?r1=1.16&r2=1.17)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2009-10-02 17:58:21 | pgsql: Ensure that a cursor has an immutable snapshot throughout its |
Previous Message | Michael Meskes | 2009-10-01 18:03:54 | pgsql: Applied patch by Boszormenyi Zoltan <zb@cybertec.at> to fix |