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:58:21 |
Message-ID: | 20091002175821.93B82753FBC@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.
Tags:
----
REL8_4_STABLE
Modified Files:
--------------
pgsql/src/backend/commands:
portalcmds.c (r1.79 -> r1.79.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/portalcmds.c?r1=1.79&r2=1.79.2.1)
pgsql/src/backend/executor:
spi.c (r1.208 -> r1.208.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/spi.c?r1=1.208&r2=1.208.2.1)
pgsql/src/backend/utils/time:
snapmgr.c (r1.10 -> r1.10.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/time/snapmgr.c?r1=1.10&r2=1.10.2.1)
pgsql/src/include/utils:
snapmgr.h (r1.5 -> r1.5.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/snapmgr.h?r1=1.5&r2=1.5.2.1)
pgsql/src/test/regress/expected:
portals.out (r1.21 -> r1.21.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/portals.out?r1=1.21&r2=1.21.2.1)
pgsql/src/test/regress/sql:
portals.sql (r1.16 -> r1.16.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/portals.sql?r1=1.16&r2=1.16.2.1)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-10-02 18:13:04 | pgsql: Fix erroneous handling of shared dependencies (ie dependencies on |
Previous Message | Alvaro Herrera | 2009-10-02 17:57:30 | pgsql: Ensure that a cursor has an immutable snapshot throughout its |