aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/cache/inval.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-11-16 23:30:35 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-11-16 23:30:35 +0000
commitc845b4272c572efd372b026201c95d58c0b0043f (patch)
tree6f12e21e991e591046c1d5df94e2fd19404952e7 /src/backend/utils/cache/inval.c
parentaea081bb275211f9d9e68a05db8c8b3eb31f2585 (diff)
downloadpostgresql-c845b4272c572efd372b026201c95d58c0b0043f.tar.gz
postgresql-c845b4272c572efd372b026201c95d58c0b0043f.zip
IsSystemRelationName() treats TOAST relations as system relations.
This seems the right thing for most usages, but I notice two places where it is the wrong thing. One is that the default permissions on TOAST rels should be no-access, not world-readable; the other is that PrepareForTupleInvalidation doesn't really need to spend time looking at tuples of TOAST relations.
Diffstat (limited to 'src/backend/utils/cache/inval.c')
-rw-r--r--src/backend/utils/cache/inval.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c
index 9ebf5f3bf2f..40d79942d5e 100644
--- a/src/backend/utils/cache/inval.c
+++ b/src/backend/utils/cache/inval.c
@@ -56,7 +56,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.46 2001/10/25 05:49:46 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.47 2001/11/16 23:30:35 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -437,9 +437,13 @@ PrepareForTupleInvalidation(Relation relation, HeapTuple tuple,
* We only need to worry about invalidation for tuples that are in
* system relations; user-relation tuples are never in catcaches and
* can't affect the relcache either.
+ *
+ * TOAST tuples can likewise be ignored here.
*/
if (!IsSystemRelationName(NameStr(RelationGetForm(relation)->relname)))
return;
+ if (IsToastRelationName(NameStr(RelationGetForm(relation)->relname)))
+ return;
/*
* First let the catcache do its thing