mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
pgindent run for 9.0, second run
This commit is contained in:
5
src/backend/utils/cache/catcache.c
vendored
5
src/backend/utils/cache/catcache.c
vendored
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/cache/catcache.c,v 1.152 2010/04/20 23:48:47 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/cache/catcache.c,v 1.153 2010/07/06 19:18:58 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -994,6 +994,7 @@ IndexScanOK(CatCache *cache, ScanKey cur_skey)
|
||||
switch (cache->id)
|
||||
{
|
||||
case INDEXRELID:
|
||||
|
||||
/*
|
||||
* Rather than tracking exactly which indexes have to be loaded
|
||||
* before we can use indexscans (which changes from time to time),
|
||||
@ -1006,6 +1007,7 @@ IndexScanOK(CatCache *cache, ScanKey cur_skey)
|
||||
|
||||
case AMOID:
|
||||
case AMNAME:
|
||||
|
||||
/*
|
||||
* Always do heap scans in pg_am, because it's so small there's
|
||||
* not much point in an indexscan anyway. We *must* do this when
|
||||
@ -1017,6 +1019,7 @@ IndexScanOK(CatCache *cache, ScanKey cur_skey)
|
||||
case AUTHNAME:
|
||||
case AUTHOID:
|
||||
case AUTHMEMMEMROLE:
|
||||
|
||||
/*
|
||||
* Protect authentication lookups occurring before relcache has
|
||||
* collected entries for shared indexes.
|
||||
|
20
src/backend/utils/cache/relcache.c
vendored
20
src/backend/utils/cache/relcache.c
vendored
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.310 2010/04/20 23:48:47 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.311 2010/07/06 19:18:58 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1832,7 +1832,7 @@ RelationDestroyRelation(Relation relation)
|
||||
*
|
||||
* NB: when rebuilding, we'd better hold some lock on the relation,
|
||||
* else the catalog data we need to read could be changing under us.
|
||||
* Also, a rel to be rebuilt had better have refcnt > 0. This is because
|
||||
* Also, a rel to be rebuilt had better have refcnt > 0. This is because
|
||||
* an sinval reset could happen while we're accessing the catalogs, and
|
||||
* the rel would get blown away underneath us by RelationCacheInvalidate
|
||||
* if it has zero refcnt.
|
||||
@ -1847,8 +1847,8 @@ RelationClearRelation(Relation relation, bool rebuild)
|
||||
Oid old_reltype = relation->rd_rel->reltype;
|
||||
|
||||
/*
|
||||
* As per notes above, a rel to be rebuilt MUST have refcnt > 0; while
|
||||
* of course it would be a bad idea to blow away one with nonzero refcnt.
|
||||
* As per notes above, a rel to be rebuilt MUST have refcnt > 0; while of
|
||||
* course it would be a bad idea to blow away one with nonzero refcnt.
|
||||
*/
|
||||
Assert(rebuild ?
|
||||
!RelationHasReferenceCountZero(relation) :
|
||||
@ -2051,9 +2051,9 @@ RelationFlushRelation(Relation relation)
|
||||
* forget the "new" status of the relation, which is a useful
|
||||
* optimization to have. Ditto for the new-relfilenode status.
|
||||
*
|
||||
* The rel could have zero refcnt here, so temporarily increment
|
||||
* the refcnt to ensure it's safe to rebuild it. We can assume that
|
||||
* the current transaction has some lock on the rel already.
|
||||
* The rel could have zero refcnt here, so temporarily increment the
|
||||
* refcnt to ensure it's safe to rebuild it. We can assume that the
|
||||
* current transaction has some lock on the rel already.
|
||||
*/
|
||||
RelationIncrementReferenceCount(relation);
|
||||
RelationClearRelation(relation, true);
|
||||
@ -2064,7 +2064,7 @@ RelationFlushRelation(Relation relation)
|
||||
/*
|
||||
* Pre-existing rels can be dropped from the relcache if not open.
|
||||
*/
|
||||
bool rebuild = !RelationHasReferenceCountZero(relation);
|
||||
bool rebuild = !RelationHasReferenceCountZero(relation);
|
||||
|
||||
RelationClearRelation(relation, rebuild);
|
||||
}
|
||||
@ -2775,8 +2775,8 @@ RelationCacheInitializePhase2(void)
|
||||
RelationMapInitializePhase2();
|
||||
|
||||
/*
|
||||
* In bootstrap mode, the shared catalogs aren't there yet anyway,
|
||||
* so do nothing.
|
||||
* In bootstrap mode, the shared catalogs aren't there yet anyway, so do
|
||||
* nothing.
|
||||
*/
|
||||
if (IsBootstrapProcessingMode())
|
||||
return;
|
||||
|
Reference in New Issue
Block a user