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)

-- 
Sent via pgsql-committers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Reply via email to