Thread: pgsql: Fix PREPARE TRANSACTION to reject the case where the transaction

pgsql: Fix PREPARE TRANSACTION to reject the case where the transaction

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Fix PREPARE TRANSACTION to reject the case where the transaction has dropped a
temporary table; we can't support that because there's no way to clean up the
source backend's internal state if the eventual COMMIT PREPARED is done by
another backend.  This was checked correctly in 8.1 but I broke it in 8.2 :-(.
Patch by Heikki Linnakangas, original trouble report by John Smith.

Modified Files:
--------------
    pgsql/src/backend/access/heap:
        heapam.c (r1.249 -> r1.250)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/heap/heapam.c?r1=1.249&r2=1.250)
    pgsql/src/backend/access/transam:
        xact.c (r1.257 -> r1.258)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xact.c?r1=1.257&r2=1.258)
    pgsql/src/backend/storage/lmgr:
        lmgr.c (r1.96 -> r1.97)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/lmgr.c?r1=1.96&r2=1.97)
        lock.c (r1.181 -> r1.182)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/lock.c?r1=1.181&r2=1.182)
    pgsql/src/include/access:
        xact.h (r1.93 -> r1.94)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/xact.h?r1=1.93&r2=1.94)
    pgsql/src/include/storage:
        lmgr.h (r1.60 -> r1.61)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/lmgr.h?r1=1.60&r2=1.61)