postgresql/src/backend/utils/cache
Tom Lane 6919b7e329 Fix failure to ignore leftover temp tables after a server crash.
During crash recovery, we remove disk files belonging to temporary tables,
but the system catalog entries for such tables are intentionally not
cleaned up right away.  Instead, the first backend that uses a temp schema
is expected to clean out any leftover objects therein.  This approach
requires that we be careful to ignore leftover temp tables (since any
actual access attempt would fail), *even if their BackendId matches our
session*, if we have not yet established use of the session's corresponding
temp schema.  That worked fine in the past, but was broken by commit
debcec7dc3 which incorrectly removed the
rd_islocaltemp relcache flag.  Put it back, and undo various changes
that substituted tests like "rel->rd_backend == MyBackendId" for use
of a state-aware flag.  Per trouble report from Heikki Linnakangas.

Back-patch to 9.1 where the erroneous change was made.  In the back
branches, be careful to add rd_islocaltemp in a spot in the struct that
was alignment padding before, so as not to break existing add-on code.
2012-12-17 20:15:32 -05:00
..
attoptcache.c remove catcache.h from syscache.h 2012-08-28 18:36:39 -04:00
catcache.c Further cleanup of catcache.c ilist changes. 2012-10-18 19:30:43 -04:00
evtcache.c Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
inval.c Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
lsyscache.c Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
Makefile Make new event trigger facility actually do something. 2012-07-20 11:39:01 -04:00
plancache.c Split resowner.h 2012-08-28 18:02:07 -04:00
relcache.c Fix failure to ignore leftover temp tables after a server crash. 2012-12-17 20:15:32 -05:00
relmapper.c Split out rmgr rm_desc functions into their own files 2012-11-28 13:01:15 -03:00
spccache.c remove catcache.h from syscache.h 2012-08-28 18:36:39 -04:00
syscache.c Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
ts_cache.c Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
typcache.c Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00