1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-23 14:01:44 +03:00

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.
This commit is contained in:
Tom Lane
2001-11-16 23:30:35 +00:00
parent aea081bb27
commit c845b4272c
4 changed files with 30 additions and 11 deletions

View File

@ -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