]> granicus.if.org Git - postgresql/commit
Revise mechanism for getting rid of temp tables at backend shutdown.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 7 Feb 2003 01:33:06 +0000 (01:33 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 7 Feb 2003 01:33:06 +0000 (01:33 +0000)
commit3acf42231634513e8ba3b67d1ea7cb275d8e5fb3
treeeb7135d4ee43b178d7c11c31c7421c731d09f5e7
parent00f1a41ab253b2e05397d041ba29d21f386b7f01
Revise mechanism for getting rid of temp tables at backend shutdown.
Instead of grovelling through pg_class to find them, make use of the
handy dandy dependency mechanism: just delete everything that depends
on our temp schema.  Unlike the pg_class scan, the dependency mechanism
is smart enough to delete things in an order that doesn't fall foul of
any dependency restrictions.  Fixes problem reported by David Heggie:
a temp table with a serial column may cause a backend FATAL exit at
shutdown time, if it chances to try to delete the temp sequence first.
src/backend/catalog/dependency.c
src/backend/catalog/namespace.c
src/include/catalog/dependency.h