pgsql: Fix bug in temporary file management with subtransactions.

From: heikki(at)postgresql(dot)org (Heikki Linnakangas)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix bug in temporary file management with subtransactions.
Date: 2009-12-03 11:03:29
Message-ID: 20091203110329.93ED5753FB7@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix bug in temporary file management with subtransactions. A cursor opened
in a subtransaction stays open even if the subtransaction is aborted, so
any temporary files related to it must stay alive as well. With the patch,
we use ResourceOwners to track open temporary files and don't automatically
close them at subtransaction end (though in the normal case temporary files
are registered with the subtransaction resource owner and will therefore be
closed).

At end of top transaction, we still check that there's no temporary files
marked as close-at-end-of-transaction open, but that's now just a debugging
cross-check as the resource owner cleanup should've closed them already.

Modified Files:
--------------
pgsql/src/backend/storage/file:
fd.c (r1.150 -> r1.151)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/file/fd.c?r1=1.150&r2=1.151)
pgsql/src/backend/utils/resowner:
resowner.c (r1.32 -> r1.33)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/resowner/resowner.c?r1=1.32&r2=1.33)
pgsql/src/include/utils:
resowner.h (r1.17 -> r1.18)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/resowner.h?r1=1.17&r2=1.18)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2009-12-03 11:03:35 pgsql: Fix bug in temporary file management with subtransactions.
Previous Message User Achernow 2009-12-03 04:34:27 libpqtypes - libpqtypes: updated version number