1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

Pre-beta mechanical code beautification.

Run pgindent, pgperltidy, and reformat-dat-files.
I manually fixed a couple of comments that pgindent uglified.
This commit is contained in:
Tom Lane
2022-05-12 15:17:30 -04:00
parent 93909599cd
commit 23e7b38bfe
287 changed files with 5193 additions and 3549 deletions

View File

@ -689,10 +689,10 @@ RevalidateCachedQuery(CachedPlanSource *plansource,
queryEnv);
else
tlist = pg_analyze_and_rewrite_fixedparams(rawtree,
plansource->query_string,
plansource->param_types,
plansource->num_params,
queryEnv);
plansource->query_string,
plansource->param_types,
plansource->num_params,
queryEnv);
/* Release snapshot if we got one */
if (snapshot_set)

View File

@ -5107,7 +5107,7 @@ RelationGetIndexAttrBitmap(Relation relation, IndexAttrBitmapKind attrKind)
Bitmapset *uindexattrs; /* columns in unique indexes */
Bitmapset *pkindexattrs; /* columns in the primary index */
Bitmapset *idindexattrs; /* columns in the replica identity */
Bitmapset *hotblockingattrs; /* columns with HOT blocking indexes */
Bitmapset *hotblockingattrs; /* columns with HOT blocking indexes */
List *indexoidlist;
List *newindexoidlist;
Oid relpkindex;
@ -5237,7 +5237,7 @@ restart:
{
if (indexDesc->rd_indam->amhotblocking)
hotblockingattrs = bms_add_member(hotblockingattrs,
attrnum - FirstLowInvalidHeapAttributeNumber);
attrnum - FirstLowInvalidHeapAttributeNumber);
if (isKey && i < indexDesc->rd_index->indnkeyatts)
uindexattrs = bms_add_member(uindexattrs,
@ -5258,9 +5258,9 @@ restart:
pull_varattnos(indexExpressions, 1, &hotblockingattrs);
/*
* Collect all attributes in the index predicate, too. We have to ignore
* amhotblocking flag, because the row might become indexable, in which
* case we have to add it to the index.
* Collect all attributes in the index predicate, too. We have to
* ignore amhotblocking flag, because the row might become indexable,
* in which case we have to add it to the index.
*/
pull_varattnos(indexPredicate, 1, &hotblockingattrs);
@ -5308,9 +5308,8 @@ restart:
/*
* Now save copies of the bitmaps in the relcache entry. We intentionally
* set rd_attrsvalid last, because that's what signals validity of the
* values; if we run out of memory before making that copy, we won't
* leave the relcache entry looking like the other ones are valid but
* empty.
* values; if we run out of memory before making that copy, we won't leave
* the relcache entry looking like the other ones are valid but empty.
*/
oldcxt = MemoryContextSwitchTo(CacheMemoryContext);
relation->rd_keyattr = bms_copy(uindexattrs);
@ -5636,8 +5635,8 @@ RelationBuildPublicationDesc(Relation relation, PublicationDesc *pubdesc)
pubdesc->pubactions.pubtruncate |= pubform->pubtruncate;
/*
* Check if all columns referenced in the filter expression are part of
* the REPLICA IDENTITY index or not.
* Check if all columns referenced in the filter expression are part
* of the REPLICA IDENTITY index or not.
*
* If the publication is FOR ALL TABLES then it means the table has no
* row filters and we can skip the validation.
@ -5645,7 +5644,7 @@ RelationBuildPublicationDesc(Relation relation, PublicationDesc *pubdesc)
if (!pubform->puballtables &&
(pubform->pubupdate || pubform->pubdelete) &&
pub_rf_contains_invalid_column(pubid, relation, ancestors,
pubform->pubviaroot))
pubform->pubviaroot))
{
if (pubform->pubupdate)
pubdesc->rf_valid_for_update = false;
@ -5662,7 +5661,7 @@ RelationBuildPublicationDesc(Relation relation, PublicationDesc *pubdesc)
if (!pubform->puballtables &&
(pubform->pubupdate || pubform->pubdelete) &&
pub_collist_contains_invalid_column(pubid, relation, ancestors,
pubform->pubviaroot))
pubform->pubviaroot))
{
if (pubform->pubupdate)
pubdesc->cols_valid_for_update = false;

View File

@ -287,7 +287,7 @@ RelationMapOidToFilenodeForDatabase(char *dbpath, Oid relationId)
void
RelationMapCopy(Oid dbid, Oid tsid, char *srcdbpath, char *dstdbpath)
{
RelMapFile map;
RelMapFile map;
/*
* Read the relmap file from the source database.
@ -302,8 +302,8 @@ RelationMapCopy(Oid dbid, Oid tsid, char *srcdbpath, char *dstdbpath)
* RelationMappingLock.
*
* There's no point in trying to preserve files here. The new database
* isn't usable yet anyway, and won't ever be if we can't install a
* relmap file.
* isn't usable yet anyway, and won't ever be if we can't install a relmap
* file.
*/
write_relmap_file(&map, true, false, false, dbid, tsid, dstdbpath);
}
@ -1089,11 +1089,11 @@ relmap_redo(XLogReaderState *record)
* There shouldn't be anyone else updating relmaps during WAL replay,
* but grab the lock to interlock against load_relmap_file().
*
* Note that we use the same WAL record for updating the relmap of
* an existing database as we do for creating a new database. In
* the latter case, taking the relmap log and sending sinval messages
* is unnecessary, but harmless. If we wanted to avoid it, we could
* add a flag to the WAL record to indicate which operation is being
* Note that we use the same WAL record for updating the relmap of an
* existing database as we do for creating a new database. In the
* latter case, taking the relmap log and sending sinval messages is
* unnecessary, but harmless. If we wanted to avoid it, we could add a
* flag to the WAL record to indicate which operation is being
* performed.
*/
LWLockAcquire(RelationMappingLock, LW_EXCLUSIVE);