mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Toast all the system-table columns that seem to need it. It turns out
that giving pg_proc a toast table required solving the same problems we'd have to solve for pg_class --- pg_proc is one of the relations that gets bootstrapped in relcache.c. Solution is to go back at the end of initialization and read in the *real* pg_class row to replace the phony entry created by formrdesc(). This should work as long as there's no need to touch any toasted values during initialization, which seems a reasonable assumption. Although I did not add a toast-table for every single system table with a varlena attribute, I believe that it would work to just do ALTER TABLE pg_class CREATE TOAST TABLE. So anyone who's really intent on having several thousand ACL entries for a rel could do it. NOTE: I didn't force initdb, but you must do one to see the effects of this patch.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: relcache.h,v 1.20 2000/06/17 21:49:04 tgl Exp $
|
||||
* $Id: relcache.h,v 1.21 2000/08/06 04:39:55 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -33,6 +33,12 @@ extern void RelationForgetRelation(Oid rid);
|
||||
*/
|
||||
extern List *RelationGetIndexList(Relation relation);
|
||||
|
||||
/*
|
||||
* Routines for backend startup
|
||||
*/
|
||||
extern void RelationCacheInitialize(void);
|
||||
extern void RelationCacheInitializePhase2(void);
|
||||
|
||||
/*
|
||||
* Routines for flushing/rebuilding relcache entries in various scenarios
|
||||
*/
|
||||
@@ -42,7 +48,6 @@ extern void RelationCacheInvalidate(void);
|
||||
|
||||
extern void RelationRegisterRelation(Relation relation);
|
||||
extern void RelationPurgeLocalRelation(bool xactComitted);
|
||||
extern void RelationInitialize(void);
|
||||
|
||||
extern void RelationCacheAbort(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user