summaryrefslogtreecommitdiff
path: root/src/backend/utils/cache
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-01-17 17:33:23 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-01-17 17:33:23 +0000
commit7b3d9367b449f160fd4597094b0e18054d555b09 (patch)
treef109232720b413474b59d94070d1f8c860be39df /src/backend/utils/cache
parentafe91cae6c45f5f06881651e6cea35972a0d4586 (diff)
Repair problems with the result of lookup_rowtype_tupdesc() possibly being
discarded by cache flush while still in use. This is a minimal patch that just copies the tupdesc anywhere it could be needed across a flush. Applied to back branches only; Neil Conway is working on a better long-term solution for HEAD.
Diffstat (limited to 'src/backend/utils/cache')
-rw-r--r--src/backend/utils/cache/typcache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/utils/cache/typcache.c b/src/backend/utils/cache/typcache.c
index b681892ca9e..16025e2c6ff 100644
--- a/src/backend/utils/cache/typcache.c
+++ b/src/backend/utils/cache/typcache.c
@@ -36,7 +36,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/cache/typcache.c,v 1.15.2.1 2005/11/22 18:23:23 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/cache/typcache.c,v 1.15.2.2 2006/01/17 17:33:21 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -377,6 +377,8 @@ lookup_default_opclass(Oid type_id, Oid am_id)
*
* Note: returned TupleDesc points to cached copy; caller must copy it
* if intending to scribble on it or keep a reference for a long time.
+ * ("A long time" basically means "across any possible cache flush",
+ * which typically could occur at any relation open or catalog lookup.)
*/
TupleDesc
lookup_rowtype_tupdesc(Oid type_id, int32 typmod)