diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-06-16 18:42:24 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-06-16 18:42:24 +0000 |
commit | 06e10abc0bb4297a0754313b4f158bdd5622ca24 (patch) | |
tree | 6d413dfdfab3fea4a6d96b07b7fdb8ba81498860 /src/backend/executor/execJunk.c | |
parent | b49ce32da1975b2fdab26e463b7189b95e770809 (diff) | |
download | postgresql-06e10abc0bb4297a0754313b4f158bdd5622ca24.tar.gz postgresql-06e10abc0bb4297a0754313b4f158bdd5622ca24.zip |
Fix problems with cached tuple descriptors disappearing while still in use
by creating a reference-count mechanism, similar to what we did a long time
ago for catcache entries. The back branches have an ugly solution involving
lots of extra copies, but this way is more efficient. Reference counting is
only applied to tupdescs that are actually in caches --- there seems no need
to use it for tupdescs that are generated in the executor, since they'll go
away during plan shutdown by virtue of being in the per-query memory context.
Neil Conway and Tom Lane
Diffstat (limited to 'src/backend/executor/execJunk.c')
-rw-r--r-- | src/backend/executor/execJunk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/executor/execJunk.c b/src/backend/executor/execJunk.c index 787a569b8f8..459e5db7aaa 100644 --- a/src/backend/executor/execJunk.c +++ b/src/backend/executor/execJunk.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/execJunk.c,v 1.52 2006/03/05 15:58:25 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/executor/execJunk.c,v 1.53 2006/06/16 18:42:21 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -79,7 +79,7 @@ ExecInitJunkFilter(List *targetList, bool hasoid, TupleTableSlot *slot) * Use the given slot, or make a new slot if we weren't given one. */ if (slot) - ExecSetSlotDescriptor(slot, cleanTupType, false); + ExecSetSlotDescriptor(slot, cleanTupType); else slot = MakeSingleTupleTableSlot(cleanTupType); @@ -150,7 +150,7 @@ ExecInitJunkFilterConversion(List *targetList, * Use the given slot, or make a new slot if we weren't given one. */ if (slot) - ExecSetSlotDescriptor(slot, cleanTupType, false); + ExecSetSlotDescriptor(slot, cleanTupType); else slot = MakeSingleTupleTableSlot(cleanTupType); |