1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-28 18:48:04 +03:00

Initial pgindent and pgperltidy run for v13.

Includes some manual cleanup of places that pgindent messed up,
most of which weren't per project style anyway.

Notably, it seems some people didn't absorb the style rules of
commit c9d297751, because there were a bunch of new occurrences
of function calls with a newline just after the left paren, all
with faulty expectations about how the rest of the call would get
indented.
This commit is contained in:
Tom Lane
2020-05-14 13:06:38 -04:00
parent 1255466f83
commit 5cbfce562f
198 changed files with 2019 additions and 1786 deletions

View File

@@ -80,7 +80,7 @@ InitializeBackupManifest(backup_manifest_info *manifest,
void
AddFileToBackupManifest(backup_manifest_info *manifest, const char *spcoid,
const char *pathname, size_t size, pg_time_t mtime,
pg_checksum_context * checksum_ctx)
pg_checksum_context *checksum_ctx)
{
char pathbuf[MAXPGPATH];
int pathlen;
@@ -103,11 +103,11 @@ AddFileToBackupManifest(backup_manifest_info *manifest, const char *spcoid,
}
/*
* Each file's entry needs to be separated from any entry that follows by a
* comma, but there's no comma before the first one or after the last one.
* To make that work, adding a file to the manifest starts by terminating
* the most recently added line, with a comma if appropriate, but does not
* terminate the line inserted for this file.
* Each file's entry needs to be separated from any entry that follows by
* a comma, but there's no comma before the first one or after the last
* one. To make that work, adding a file to the manifest starts by
* terminating the most recently added line, with a comma if appropriate,
* but does not terminate the line inserted for this file.
*/
initStringInfo(&buf);
if (manifest->first_file)

View File

@@ -52,7 +52,7 @@ typedef struct LogicalRepPartMapEntry
{
Oid partoid; /* LogicalRepPartMap's key */
LogicalRepRelMapEntry relmapentry;
} LogicalRepPartMapEntry;
} LogicalRepPartMapEntry;
/*
* Relcache invalidation callback for our relation map cache.

View File

@@ -692,7 +692,7 @@ get_rel_sync_entry(PGOutputData *data, Oid relid)
if (!publish)
{
bool ancestor_published = false;
bool ancestor_published = false;
/*
* For a partition, check if any of the ancestors are
@@ -702,13 +702,16 @@ get_rel_sync_entry(PGOutputData *data, Oid relid)
*/
if (am_partition)
{
List *ancestors = get_partition_ancestors(relid);
ListCell *lc2;
List *ancestors = get_partition_ancestors(relid);
ListCell *lc2;
/* Find the "topmost" ancestor that is in this publication. */
/*
* Find the "topmost" ancestor that is in this
* publication.
*/
foreach(lc2, ancestors)
{
Oid ancestor = lfirst_oid(lc2);
Oid ancestor = lfirst_oid(lc2);
if (list_member_oid(GetRelationPublications(ancestor),
pub->oid))

View File

@@ -425,10 +425,9 @@ pg_physical_replication_slot_advance(XLogRecPtr moveto)
retlsn = moveto;
/*
* Dirty the slot so as it is written out at the next checkpoint.
* Note that the LSN position advanced may still be lost in the
* event of a crash, but this makes the data consistent after a
* clean shutdown.
* Dirty the slot so as it is written out at the next checkpoint. Note
* that the LSN position advanced may still be lost in the event of a
* crash, but this makes the data consistent after a clean shutdown.
*/
ReplicationSlotMarkDirty();
}
@@ -532,9 +531,9 @@ pg_logical_replication_slot_advance(XLogRecPtr moveto)
* keep track of their progress, so we should make more of an
* effort to save it for them.
*
* Dirty the slot so it is written out at the next checkpoint.
* The LSN position advanced to may still be lost on a crash
* but this makes the data consistent after a clean shutdown.
* Dirty the slot so it is written out at the next checkpoint. The
* LSN position advanced to may still be lost on a crash but this
* makes the data consistent after a clean shutdown.
*/
ReplicationSlotMarkDirty();
}

View File

@@ -255,10 +255,10 @@ RequestXLogStreaming(TimeLineID tli, XLogRecPtr recptr, const char *conninfo,
walrcv->conninfo[0] = '\0';
/*
* Use configured replication slot if present, and ignore the value
* of create_temp_slot as the slot name should be persistent. Otherwise,
* use create_temp_slot to determine whether this WAL receiver should
* create a temporary slot by itself and use it, or not.
* Use configured replication slot if present, and ignore the value of
* create_temp_slot as the slot name should be persistent. Otherwise, use
* create_temp_slot to determine whether this WAL receiver should create a
* temporary slot by itself and use it, or not.
*/
if (slotname != NULL && slotname[0] != '\0')
{

View File

@@ -346,14 +346,14 @@ WalSndErrorCleanup(void)
void
WalSndResourceCleanup(bool isCommit)
{
ResourceOwner resowner;
ResourceOwner resowner;
if (CurrentResourceOwner == NULL)
return;
/*
* Deleting CurrentResourceOwner is not allowed, so we must save a
* pointer in a local variable and clear it first.
* Deleting CurrentResourceOwner is not allowed, so we must save a pointer
* in a local variable and clear it first.
*/
resowner = CurrentResourceOwner;
CurrentResourceOwner = NULL;