diff options
Diffstat (limited to 'src/backend/utils/cache')
-rw-r--r-- | src/backend/utils/cache/inval.c | 15 | ||||
-rw-r--r-- | src/backend/utils/cache/lsyscache.c | 2 | ||||
-rw-r--r-- | src/backend/utils/cache/plancache.c | 4 | ||||
-rw-r--r-- | src/backend/utils/cache/relcache.c | 16 | ||||
-rw-r--r-- | src/backend/utils/cache/syscache.c | 16 |
5 files changed, 28 insertions, 25 deletions
diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c index a1e6ea2a356..819121638ea 100644 --- a/src/backend/utils/cache/inval.c +++ b/src/backend/utils/cache/inval.c @@ -386,10 +386,9 @@ AddRelcacheInvalidationMessage(InvalidationListHeader *hdr, SharedInvalidationMessage msg; /* - * Don't add a duplicate item. - * We assume dbId need not be checked because it will never change. - * InvalidOid for relId means all relations so we don't need to add - * individual ones when it is present. + * Don't add a duplicate item. We assume dbId need not be checked because + * it will never change. InvalidOid for relId means all relations so we + * don't need to add individual ones when it is present. */ ProcessMessageList(hdr->rclist, if (msg->rc.id == SHAREDINVALRELCACHE_ID && @@ -523,8 +522,8 @@ RegisterRelcacheInvalidation(Oid dbId, Oid relId) /* * If the relation being invalidated is one of those cached in the local - * relcache init file, mark that we need to zap that file at commit. - * Same is true when we are invalidating whole relcache. + * relcache init file, mark that we need to zap that file at commit. Same + * is true when we are invalidating whole relcache. */ if (OidIsValid(dbId) && (RelationIdIsInInitFile(relId) || relId == InvalidOid)) @@ -1139,8 +1138,8 @@ CacheInvalidateHeapTuple(Relation relation, RegisterCatcacheInvalidation); /* - * Now, is this tuple one of the primary definers of a relcache entry? - * See comments in file header for deeper explanation. + * Now, is this tuple one of the primary definers of a relcache entry? See + * comments in file header for deeper explanation. * * Note we ignore newtuple here; we assume an update cannot move a tuple * from being part of one relcache entry to being part of another. diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c index b94d4755055..4def73ddfbe 100644 --- a/src/backend/utils/cache/lsyscache.c +++ b/src/backend/utils/cache/lsyscache.c @@ -858,7 +858,7 @@ get_attidentity(Oid relid, AttrNumber attnum) if (HeapTupleIsValid(tp)) { Form_pg_attribute att_tup = (Form_pg_attribute) GETSTRUCT(tp); - char result; + char result; result = att_tup->attidentity; ReleaseSysCache(tp); diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c index abff7474f55..4b5f8107ef0 100644 --- a/src/backend/utils/cache/plancache.c +++ b/src/backend/utils/cache/plancache.c @@ -89,7 +89,7 @@ static CachedPlanSource *first_saved_plan = NULL; static void ReleaseGenericPlan(CachedPlanSource *plansource); static List *RevalidateCachedQuery(CachedPlanSource *plansource, - QueryEnvironment *queryEnv); + QueryEnvironment *queryEnv); static bool CheckCachedPlan(CachedPlanSource *plansource); static CachedPlan *BuildCachedPlan(CachedPlanSource *plansource, List *qlist, ParamListInfo boundParams, QueryEnvironment *queryEnv); @@ -1520,7 +1520,7 @@ AcquireExecutorLocks(List *stmt_list, bool acquire) * acquire a non-conflicting lock. */ if (list_member_int(plannedstmt->resultRelations, rt_index) || - list_member_int(plannedstmt->nonleafResultRelations, rt_index)) + list_member_int(plannedstmt->nonleafResultRelations, rt_index)) lockmode = RowExclusiveLock; else if ((rc = get_plan_rowmark(plannedstmt->rowMarks, rt_index)) != NULL && RowMarkRequiresRowShareLock(rc->markType)) diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 0cd6289f916..c2e8361f2f4 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -4504,7 +4504,10 @@ RelationGetStatExtList(Relation relation) */ result = NIL; - /* Prepare to scan pg_statistic_ext for entries having stxrelid = this rel. */ + /* + * Prepare to scan pg_statistic_ext for entries having stxrelid = this + * rel. + */ ScanKeyInit(&skey, Anum_pg_statistic_ext_stxrelid, BTEqualStrategyNumber, F_OIDEQ, @@ -4603,9 +4606,10 @@ RelationSetIndexList(Relation relation, List *indexIds, Oid oidIndex) list_free(relation->rd_indexlist); relation->rd_indexlist = indexIds; relation->rd_oidindex = oidIndex; + /* - * For the moment, assume the target rel hasn't got a pk or replica - * index. We'll load them on demand in the API that wraps access to them. + * For the moment, assume the target rel hasn't got a pk or replica index. + * We'll load them on demand in the API that wraps access to them. */ relation->rd_pkindex = InvalidOid; relation->rd_replidindex = InvalidOid; @@ -5169,7 +5173,7 @@ GetRelationPublicationActions(Relation relation) { List *puboids; ListCell *lc; - MemoryContext oldcxt; + MemoryContext oldcxt; PublicationActions *pubactions = palloc0(sizeof(PublicationActions)); if (relation->rd_pubactions) @@ -5200,8 +5204,8 @@ GetRelationPublicationActions(Relation relation) ReleaseSysCache(tup); /* - * If we know everything is replicated, there is no point to check - * for other publications. + * If we know everything is replicated, there is no point to check for + * other publications. */ if (pubactions->pubinsert && pubactions->pubupdate && pubactions->pubdelete) diff --git a/src/backend/utils/cache/syscache.c b/src/backend/utils/cache/syscache.c index f0a16e309c0..922718c9d17 100644 --- a/src/backend/utils/cache/syscache.c +++ b/src/backend/utils/cache/syscache.c @@ -661,7 +661,7 @@ static const struct cachedesc cacheinfo[] = { }, 16 }, - {PublicationRelationId, /* PUBLICATIONOID */ + {PublicationRelationId, /* PUBLICATIONOID */ PublicationObjectIndexId, 1, { @@ -672,7 +672,7 @@ static const struct cachedesc cacheinfo[] = { }, 8 }, - {PublicationRelationId, /* PUBLICATIONNAME */ + {PublicationRelationId, /* PUBLICATIONNAME */ PublicationNameIndexId, 1, { @@ -683,7 +683,7 @@ static const struct cachedesc cacheinfo[] = { }, 8 }, - {PublicationRelRelationId, /* PUBLICATIONREL */ + {PublicationRelRelationId, /* PUBLICATIONREL */ PublicationRelObjectIndexId, 1, { @@ -694,7 +694,7 @@ static const struct cachedesc cacheinfo[] = { }, 64 }, - {PublicationRelRelationId, /* PUBLICATIONRELMAP */ + {PublicationRelRelationId, /* PUBLICATIONRELMAP */ PublicationRelPrrelidPrpubidIndexId, 2, { @@ -716,7 +716,7 @@ static const struct cachedesc cacheinfo[] = { }, 8 }, - {SequenceRelationId, /* SEQRELID */ + {SequenceRelationId, /* SEQRELID */ SequenceRelidIndexId, 1, { @@ -760,7 +760,7 @@ static const struct cachedesc cacheinfo[] = { }, 128 }, - {SubscriptionRelationId, /* SUBSCRIPTIONOID */ + {SubscriptionRelationId, /* SUBSCRIPTIONOID */ SubscriptionObjectIndexId, 1, { @@ -771,7 +771,7 @@ static const struct cachedesc cacheinfo[] = { }, 4 }, - {SubscriptionRelationId, /* SUBSCRIPTIONNAME */ + {SubscriptionRelationId, /* SUBSCRIPTIONNAME */ SubscriptionNameIndexId, 2, { @@ -782,7 +782,7 @@ static const struct cachedesc cacheinfo[] = { }, 4 }, - {SubscriptionRelRelationId, /* SUBSCRIPTIONRELMAP */ + {SubscriptionRelRelationId, /* SUBSCRIPTIONRELMAP */ SubscriptionRelSrrelidSrsubidIndexId, 2, { |