diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 27e04cd34bae0c692459ad32d32663ede96a0884..3609c8ae7ca98be41ef832afcd33aca5882d7f35 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -356,7 +356,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 		ereport(ERROR,
 				(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
 			errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
-				   itemsz, BrinMaxItemSize, RelationGetRelationName(idxrel))));
+				 itemsz, BrinMaxItemSize, RelationGetRelationName(idxrel))));
 		return InvalidOffsetNumber;		/* keep compiler quiet */
 	}
 
diff --git a/src/backend/access/brin/brin_validate.c b/src/backend/access/brin/brin_validate.c
index 97044e61bb143ec21c12b2468153458e884e90f1..b4acf2b6f368812f69634840769ef8f24974efed 100644
--- a/src/backend/access/brin/brin_validate.c
+++ b/src/backend/access/brin/brin_validate.c
@@ -265,8 +265,8 @@ brinvalidate(Oid opclassoid)
 			continue;			/* got it */
 		ereport(INFO,
 				(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
-		  errmsg("operator class \"%s\" of access method %s is missing support function %d",
-				 opclassname, "brin", i)));
+				 errmsg("operator class \"%s\" of access method %s is missing support function %d",
+						opclassname, "brin", i)));
 		result = false;
 	}
 
diff --git a/src/backend/access/gin/ginvalidate.c b/src/backend/access/gin/ginvalidate.c
index 9b147857dcb993d50e291e8ffeb5c0199b1ad8fd..4c8e5635459954f025c9cf7e45ee639c01e5c2b3 100644
--- a/src/backend/access/gin/ginvalidate.c
+++ b/src/backend/access/gin/ginvalidate.c
@@ -244,8 +244,8 @@ ginvalidate(Oid opclassoid)
 			continue;			/* don't need both, see check below loop */
 		ereport(INFO,
 				(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
-		   errmsg("operator class \"%s\" of access method %s is missing support function %d",
-				  opclassname, "gin", i)));
+				 errmsg("operator class \"%s\" of access method %s is missing support function %d",
+						opclassname, "gin", i)));
 		result = false;
 	}
 	if (!opclassgroup ||
diff --git a/src/backend/access/gist/gistvalidate.c b/src/backend/access/gist/gistvalidate.c
index d7911ed3a198989263e7368a216c2204c702c63c..42254c5f153fba605b49b35926116f4ee9a81795 100644
--- a/src/backend/access/gist/gistvalidate.c
+++ b/src/backend/access/gist/gistvalidate.c
@@ -262,8 +262,8 @@ gistvalidate(Oid opclassoid)
 			continue;			/* optional methods */
 		ereport(INFO,
 				(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
-		  errmsg("operator class \"%s\" of access method %s is missing support function %d",
-				 opclassname, "gist", i)));
+				 errmsg("operator class \"%s\" of access method %s is missing support function %d",
+						opclassname, "gist", i)));
 		result = false;
 	}
 
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index dde8dd3401b0fdae58e4c8ea63064b6602452c71..7a6da1e3c97c2a73d655cfc3dd511c908c3ea3a2 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -3463,7 +3463,7 @@ reindex_index(Oid indexId, bool skip_constraint_checks, char persistence,
 				(errmsg("index \"%s\" was reindexed",
 						get_rel_name(indexId)),
 				 errdetail_internal("%s",
-						   pg_rusage_show(&ru0))));
+									pg_rusage_show(&ru0))));
 
 	/* Close rels, but keep locks */
 	index_close(iRel, NoLock);
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index 0a33c40c17f4041988826257bdf9ee5285d82882..ae79a2ffbc3e653c8381269614b3a9c28e71965b 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -2648,8 +2648,8 @@ CopyFrom(CopyState cstate)
 				 * tuple such that the partition constraint is no longer
 				 * satisfied, so we need to check in that case.
 				 */
-				bool	check_partition_constr =
-									(resultRelInfo->ri_PartitionCheck != NIL);
+				bool		check_partition_constr =
+				(resultRelInfo->ri_PartitionCheck != NIL);
 
 				if (saved_resultRelInfo != NULL &&
 					!(resultRelInfo->ri_TrigDesc &&
diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c
index 09e53ff004e16631999759e0d71b99fe2f6a7105..fc9c4f0fb1f57805313c6ba0327b269ac48273ed 100644
--- a/src/backend/commands/vacuumlazy.c
+++ b/src/backend/commands/vacuumlazy.c
@@ -1827,7 +1827,7 @@ lazy_truncate_heap(Relation onerel, LVRelStats *vacrelstats)
 						RelationGetRelationName(onerel),
 						old_rel_pages, new_rel_pages),
 				 errdetail_internal("%s",
-						   pg_rusage_show(&ru0))));
+									pg_rusage_show(&ru0))));
 		old_rel_pages = new_rel_pages;
 	} while (new_rel_pages > vacrelstats->nonempty_pages &&
 			 vacrelstats->lock_waiter_detected);
diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c
index 204ad3c978ff43da4a99861885c37257c220e9e4..f8f456e0e5dbfa3ccf7f07daefba0d5266b507b2 100644
--- a/src/backend/commands/variable.c
+++ b/src/backend/commands/variable.c
@@ -773,7 +773,7 @@ assign_client_encoding(const char *newval, void *extra)
 		 */
 		ereport(ERROR,
 				(errcode(ERRCODE_INVALID_TRANSACTION_STATE),
-			  errmsg("cannot change client_encoding during a parallel operation")));
+		errmsg("cannot change client_encoding during a parallel operation")));
 	}
 
 	/* We do not expect an error if PrepareClientEncoding succeeded */
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 3caeeac708c56d3ccdbfcc0e305e3e9d9ea4e9f7..7f460bd1a743d48b6ebbf70c3ced984099f9faa1 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -104,7 +104,7 @@ static char *ExecBuildSlotPartitionKeyDescription(Relation rel,
 static void EvalPlanQualStart(EPQState *epqstate, EState *parentestate,
 				  Plan *planTree);
 static void ExecPartitionCheck(ResultRelInfo *resultRelInfo,
-				  TupleTableSlot *slot, EState *estate);
+				   TupleTableSlot *slot, EState *estate);
 
 /*
  * Note that GetUpdatedColumns() also exists in commands/trigger.c.  There does
@@ -1347,8 +1347,8 @@ InitResultRelInfo(ResultRelInfo *resultRelInfo,
 	 * partition, if there any BR triggers defined on the table.  Although
 	 * tuple-routing implicitly preserves the partition constraint of the
 	 * target partition for a given row, the BR triggers may change the row
-	 * such that the constraint is no longer satisfied, which we must fail
-	 * for by checking it explicitly.
+	 * such that the constraint is no longer satisfied, which we must fail for
+	 * by checking it explicitly.
 	 *
 	 * If this is a partitioned table, the partition constraint (if any) of a
 	 * given row will be checked just before performing tuple-routing.
diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c
index 96fbfc96e8e489ac12dd5923071409c634c54af0..ff5ad98a91c295e9465c35c6558a058f645b0cb1 100644
--- a/src/backend/executor/nodeModifyTable.c
+++ b/src/backend/executor/nodeModifyTable.c
@@ -421,8 +421,8 @@ ExecInsert(ModifyTableState *mtstate,
 		 * trigger might modify the tuple such that the partition constraint
 		 * is no longer satisfied, so we need to check in that case.
 		 */
-		bool	check_partition_constr =
-								(resultRelInfo->ri_PartitionCheck != NIL);
+		bool		check_partition_constr =
+		(resultRelInfo->ri_PartitionCheck != NIL);
 
 		/*
 		 * Constraints might reference the tableoid column, so initialize
diff --git a/src/backend/libpq/auth-scram.c b/src/backend/libpq/auth-scram.c
index e4a535f4a103074d0178cb6844cfe5686f5a69e6..a6042b8013deb803c374d19af22ef6ebd6f22085 100644
--- a/src/backend/libpq/auth-scram.c
+++ b/src/backend/libpq/auth-scram.c
@@ -196,7 +196,8 @@ pg_be_scram_init(const char *username, const char *shadow_pass)
 				 * parsed.
 				 */
 				ereport(LOG,
-						(errmsg("invalid SCRAM verifier for user \"%s\"", username)));
+						(errmsg("invalid SCRAM verifier for user \"%s\"",
+								username)));
 				got_verifier = false;
 			}
 		}
@@ -673,8 +674,8 @@ read_any_attr(char **input, char *attr_p)
 		ereport(ERROR,
 				(errcode(ERRCODE_PROTOCOL_VIOLATION),
 				 errmsg("malformed SCRAM message"),
-				 errdetail("Attribute expected, but found invalid character %s.",
-						   sanitize_char(attr))));
+			 errdetail("Attribute expected, but found invalid character %s.",
+					   sanitize_char(attr))));
 	if (attr_p)
 		*attr_p = attr;
 	begin++;
@@ -1061,7 +1062,7 @@ read_client_final_message(scram_state *state, char *input)
 		ereport(ERROR,
 				(errcode(ERRCODE_PROTOCOL_VIOLATION),
 				 errmsg("malformed SCRAM message"),
-				 errdetail("Garbage found at the end of client-final-message.")));
+			errdetail("Garbage found at the end of client-final-message.")));
 
 	state->client_final_message_without_proof = palloc(proof - begin + 1);
 	memcpy(state->client_final_message_without_proof, input, proof - begin);
diff --git a/src/backend/replication/logical/relation.c b/src/backend/replication/logical/relation.c
index e65f2865ddb6acced13d985620bdcc31297b04bf..2bd1d9f7928eb001c0dd45d68689efd38585f9c6 100644
--- a/src/backend/replication/logical/relation.c
+++ b/src/backend/replication/logical/relation.c
@@ -283,7 +283,7 @@ logicalrep_rel_open(LogicalRepRelId remoteid, LOCKMODE lockmode)
 				continue;
 
 			attnum = logicalrep_rel_att_by_name(remoterel,
-												NameStr(desc->attrs[i]->attname));
+										   NameStr(desc->attrs[i]->attname));
 
 			entry->attrmap[i] = attnum;
 			if (attnum >= 0)
diff --git a/src/backend/replication/logical/tablesync.c b/src/backend/replication/logical/tablesync.c
index 50af7e72536920e179f1d575cfdcce6e375ce109..3ff08bfb2bff3fcd1ef9ef0d054457f571648d0a 100644
--- a/src/backend/replication/logical/tablesync.c
+++ b/src/backend/replication/logical/tablesync.c
@@ -44,8 +44,8 @@
  *		 point it sets state to READY and stops tracking.  Again, there might
  *		 be zero changes in between.
  *
- *    So the state progression is always: INIT -> DATASYNC -> SYNCWAIT -> CATCHUP ->
- *    SYNCDONE -> READY.
+ *	  So the state progression is always: INIT -> DATASYNC -> SYNCWAIT -> CATCHUP ->
+ *	  SYNCDONE -> READY.
  *
  *	  The catalog pg_subscription_rel is used to keep information about
  *	  subscribed tables and their state.  Some transient state during data
@@ -136,7 +136,8 @@ finish_sync_worker(void)
 	StartTransactionCommand();
 	ereport(LOG,
 			(errmsg("logical replication table synchronization worker for subscription \"%s\", table \"%s\" has finished",
-					MySubscription->name, get_rel_name(MyLogicalRepWorker->relid))));
+					MySubscription->name,
+					get_rel_name(MyLogicalRepWorker->relid))));
 	CommitTransactionCommand();
 
 	/* Find the main apply worker and signal it. */
@@ -164,7 +165,7 @@ wait_for_relation_state_change(Oid relid, char expected_state)
 	for (;;)
 	{
 		LogicalRepWorker *worker;
-		XLogRecPtr		statelsn;
+		XLogRecPtr	statelsn;
 
 		CHECK_FOR_INTERRUPTS();
 
@@ -185,7 +186,7 @@ wait_for_relation_state_change(Oid relid, char expected_state)
 
 		/* Check if the opposite worker is still running and bail if not. */
 		worker = logicalrep_worker_find(MyLogicalRepWorker->subid,
-										am_tablesync_worker() ? InvalidOid : relid,
+								  am_tablesync_worker() ? InvalidOid : relid,
 										false);
 		LWLockRelease(LogicalRepWorkerLock);
 		if (!worker)
@@ -401,8 +402,8 @@ process_syncing_tables_for_apply(XLogRecPtr current_lsn)
 		{
 			/*
 			 * Apply has caught up to the position where the table sync has
-			 * finished.  Mark the table as ready so that the apply will
-			 * just continue to replicate it normally.
+			 * finished.  Mark the table as ready so that the apply will just
+			 * continue to replicate it normally.
 			 */
 			if (current_lsn >= rstate->lsn)
 			{
@@ -436,9 +437,9 @@ process_syncing_tables_for_apply(XLogRecPtr current_lsn)
 			else
 
 				/*
-				 * If there is no sync worker for this table yet, count running sync
-				 * workers for this subscription, while we have the lock, for
-				 * later.
+				 * If there is no sync worker for this table yet, count
+				 * running sync workers for this subscription, while we have
+				 * the lock, for later.
 				 */
 				nsyncworkers = logicalrep_sync_worker_count(MyLogicalRepWorker->subid);
 			LWLockRelease(LogicalRepWorkerLock);
@@ -858,17 +859,17 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
 
 				/*
 				 * Use a standard write lock here. It might be better to
-				 * disallow access to the table while it's being synchronized. But
-				 * we don't want to block the main apply process from working
-				 * and it has to open the relation in RowExclusiveLock when
-				 * remapping remote relation id to local one.
+				 * disallow access to the table while it's being synchronized.
+				 * But we don't want to block the main apply process from
+				 * working and it has to open the relation in RowExclusiveLock
+				 * when remapping remote relation id to local one.
 				 */
 				rel = heap_open(MyLogicalRepWorker->relid, RowExclusiveLock);
 
 				/*
 				 * Create a temporary slot for the sync process. We do this
-				 * inside the transaction so that we can use the snapshot made by
-				 * the slot to get existing data.
+				 * inside the transaction so that we can use the snapshot made
+				 * by the slot to get existing data.
 				 */
 				res = walrcv_exec(wrconn,
 								  "BEGIN READ ONLY ISOLATION LEVEL "
@@ -916,14 +917,15 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
 				/* Wait for main apply worker to tell us to catchup. */
 				wait_for_worker_state_change(SUBREL_STATE_CATCHUP);
 
-				/*
+				/*----------
 				 * There are now two possible states here:
 				 * a) Sync is behind the apply.  If that's the case we need to
-				 *    catch up with it by consuming the logical replication
-				 *    stream up to the relstate_lsn.  For that, we exit this
-				 *    function and continue in ApplyWorkerMain().
+				 *	  catch up with it by consuming the logical replication
+				 *	  stream up to the relstate_lsn.  For that, we exit this
+				 *	  function and continue in ApplyWorkerMain().
 				 * b) Sync is caught up with the apply.  So it can just set
-				 *    the state to SYNCDONE and finish.
+				 *	  the state to SYNCDONE and finish.
+				 *----------
 				 */
 				if (*origin_startpos >= MyLogicalRepWorker->relstate_lsn)
 				{
@@ -943,9 +945,12 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
 		case SUBREL_STATE_SYNCDONE:
 		case SUBREL_STATE_READY:
 		case SUBREL_STATE_UNKNOWN:
-			/* Nothing to do here but finish.  (UNKNOWN means the relation was
+
+			/*
+			 * Nothing to do here but finish.  (UNKNOWN means the relation was
 			 * removed from pg_subscription_rel before the sync worker could
-			 * start.) */
+			 * start.)
+			 */
 			finish_sync_worker();
 			break;
 		default:
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index 6ba70773bfd960b54ae1c753d76009d441cfc68d..97d2dff0dd34b5c2ce44003e4eaeb6cb2b92a99c 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -1343,9 +1343,9 @@ maybe_reread_subscription(void)
 	if (!newsub)
 	{
 		ereport(LOG,
-		   (errmsg("logical replication apply worker for subscription \"%s\" will "
-				   "stop because the subscription was removed",
-				   MySubscription->name)));
+				(errmsg("logical replication apply worker for subscription \"%s\" will "
+						"stop because the subscription was removed",
+						MySubscription->name)));
 
 		proc_exit(0);
 	}
@@ -1357,9 +1357,9 @@ maybe_reread_subscription(void)
 	if (!newsub->enabled)
 	{
 		ereport(LOG,
-		   (errmsg("logical replication apply worker for subscription \"%s\" will "
-				   "stop because the subscription was disabled",
-				   MySubscription->name)));
+				(errmsg("logical replication apply worker for subscription \"%s\" will "
+						"stop because the subscription was disabled",
+						MySubscription->name)));
 
 		proc_exit(0);
 	}
@@ -1371,9 +1371,9 @@ maybe_reread_subscription(void)
 	if (strcmp(newsub->conninfo, MySubscription->conninfo) != 0)
 	{
 		ereport(LOG,
-		   (errmsg("logical replication apply worker for subscription \"%s\" will "
-				   "restart because the connection information was changed",
-				   MySubscription->name)));
+				(errmsg("logical replication apply worker for subscription \"%s\" will "
+					"restart because the connection information was changed",
+						MySubscription->name)));
 
 		proc_exit(0);
 	}
@@ -1385,9 +1385,9 @@ maybe_reread_subscription(void)
 	if (strcmp(newsub->name, MySubscription->name) != 0)
 	{
 		ereport(LOG,
-		   (errmsg("logical replication apply worker for subscription \"%s\" will "
-				   "restart because subscription was renamed",
-				   MySubscription->name)));
+				(errmsg("logical replication apply worker for subscription \"%s\" will "
+						"restart because subscription was renamed",
+						MySubscription->name)));
 
 		proc_exit(0);
 	}
@@ -1402,9 +1402,9 @@ maybe_reread_subscription(void)
 	if (strcmp(newsub->slotname, MySubscription->slotname) != 0)
 	{
 		ereport(LOG,
-		   (errmsg("logical replication apply worker for subscription \"%s\" will "
-				   "restart because the replication slot name was changed",
-				   MySubscription->name)));
+				(errmsg("logical replication apply worker for subscription \"%s\" will "
+					 "restart because the replication slot name was changed",
+						MySubscription->name)));
 
 		proc_exit(0);
 	}
@@ -1416,9 +1416,9 @@ maybe_reread_subscription(void)
 	if (!equal(newsub->publications, MySubscription->publications))
 	{
 		ereport(LOG,
-		   (errmsg("logical replication apply worker for subscription \"%s\" will "
-				   "restart because subscription's publications were changed",
-				   MySubscription->name)));
+				(errmsg("logical replication apply worker for subscription \"%s\" will "
+				  "restart because subscription's publications were changed",
+						MySubscription->name)));
 
 		proc_exit(0);
 	}
@@ -1524,9 +1524,9 @@ ApplyWorkerMain(Datum main_arg)
 	if (!MySubscription->enabled)
 	{
 		ereport(LOG,
-		(errmsg("logical replication apply worker for subscription \"%s\" will not "
+				(errmsg("logical replication apply worker for subscription \"%s\" will not "
 				"start because the subscription was disabled during startup",
-				MySubscription->name)));
+						MySubscription->name)));
 
 		proc_exit(0);
 	}
@@ -1539,7 +1539,7 @@ ApplyWorkerMain(Datum main_arg)
 	if (am_tablesync_worker())
 		ereport(LOG,
 				(errmsg("logical replication table synchronization worker for subscription \"%s\", table \"%s\" has started",
-						MySubscription->name, get_rel_name(MyLogicalRepWorker->relid))));
+			MySubscription->name, get_rel_name(MyLogicalRepWorker->relid))));
 	else
 		ereport(LOG,
 				(errmsg("logical replication apply worker for subscription \"%s\" has started",
@@ -1577,8 +1577,8 @@ ApplyWorkerMain(Datum main_arg)
 
 		/*
 		 * This shouldn't happen if the subscription is enabled, but guard
-		 * against DDL bugs or manual catalog changes.  (libpqwalreceiver
-		 * will crash if slot is NULL.
+		 * against DDL bugs or manual catalog changes.  (libpqwalreceiver will
+		 * crash if slot is NULL.)
 		 */
 		if (!myslotname)
 			ereport(ERROR,
diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c
index 399380735c57cdb4092a975ac138c8b23a08506f..e6812eef892e34ad20189a35bcb09ff30087982a 100644
--- a/src/backend/rewrite/rewriteHandler.c
+++ b/src/backend/rewrite/rewriteHandler.c
@@ -1836,7 +1836,7 @@ fireRIRrules(Query *parsetree, List *activeRIRs, bool forUpdatePushedDown)
 		/* Only normal relations can have RLS policies */
 		if (rte->rtekind != RTE_RELATION ||
 			(rte->relkind != RELKIND_RELATION &&
-			rte->relkind != RELKIND_PARTITIONED_TABLE))
+			 rte->relkind != RELKIND_PARTITIONED_TABLE))
 			continue;
 
 		rel = heap_open(rte->relid, NoLock);
diff --git a/src/backend/storage/page/bufpage.c b/src/backend/storage/page/bufpage.c
index c6505140bd3e0ba3d09ae6e5c8ca2bf850731b2c..1b53d651cd2a8ceb7e89b17f7b1aa25b7cc26998 100644
--- a/src/backend/storage/page/bufpage.c
+++ b/src/backend/storage/page/bufpage.c
@@ -902,8 +902,8 @@ PageIndexMultiDelete(Page page, OffsetNumber *itemnos, int nitems)
 			offset != MAXALIGN(offset))
 			ereport(ERROR,
 					(errcode(ERRCODE_DATA_CORRUPTED),
-					 errmsg("corrupted item pointer: offset = %u, length = %u",
-							offset, (unsigned int) size)));
+				   errmsg("corrupted item pointer: offset = %u, length = %u",
+						  offset, (unsigned int) size)));
 
 		if (nextitm < nitems && offnum == itemnos[nextitm])
 		{
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 91ca8df2ea7c439eb7172db35abbcb7dc74fd44c..f99dd0a2d49e5758bf01834a6f91d48e1f7ea7a5 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -3639,8 +3639,8 @@ PostgresMain(int argc, char *argv[],
 		WalSndSignals();
 	else
 	{
-		pqsignal(SIGHUP, PostgresSigHupHandler);		/* set flag to read config
-														 * file */
+		pqsignal(SIGHUP, PostgresSigHupHandler);		/* set flag to read
+														 * config file */
 		pqsignal(SIGINT, StatementCancelHandler);		/* cancel current query */
 		pqsignal(SIGTERM, die); /* cancel current query and exit */
 
diff --git a/src/backend/utils/adt/json.c b/src/backend/utils/adt/json.c
index 3e2dd6c0eca4c8c3686386961558500f4340484d..0f99b613f567225b08e9302a70271092f3eac756 100644
--- a/src/backend/utils/adt/json.c
+++ b/src/backend/utils/adt/json.c
@@ -2008,7 +2008,7 @@ json_object_agg_transfn(PG_FUNCTION_ARGS)
 		if (arg_type == InvalidOid)
 			ereport(ERROR,
 					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-					 errmsg("could not determine data type for argument %d", 1)));
+				errmsg("could not determine data type for argument %d", 1)));
 
 		json_categorize_type(arg_type, &state->key_category,
 							 &state->key_output_func);
@@ -2018,7 +2018,7 @@ json_object_agg_transfn(PG_FUNCTION_ARGS)
 		if (arg_type == InvalidOid)
 			ereport(ERROR,
 					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-					 errmsg("could not determine data type for argument %d", 2)));
+				errmsg("could not determine data type for argument %d", 2)));
 
 		json_categorize_type(arg_type, &state->val_category,
 							 &state->val_output_func);
diff --git a/src/backend/utils/adt/jsonb.c b/src/backend/utils/adt/jsonb.c
index 2b36ea39eb1f0b6d5bd7b40befa4ff0547b46d57..e256eaf55e51546360503ca2c1382f94f073c6be 100644
--- a/src/backend/utils/adt/jsonb.c
+++ b/src/backend/utils/adt/jsonb.c
@@ -1212,7 +1212,7 @@ jsonb_build_object(PG_FUNCTION_ARGS)
 		if (val_type == InvalidOid || val_type == UNKNOWNOID)
 			ereport(ERROR,
 					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-			   errmsg("could not determine data type for argument %d", i + 1)));
+			errmsg("could not determine data type for argument %d", i + 1)));
 
 		add_jsonb(arg, false, &result, val_type, true);
 
@@ -1235,7 +1235,7 @@ jsonb_build_object(PG_FUNCTION_ARGS)
 		if (val_type == InvalidOid || val_type == UNKNOWNOID)
 			ereport(ERROR,
 					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-			   errmsg("could not determine data type for argument %d", i + 2)));
+			errmsg("could not determine data type for argument %d", i + 2)));
 		add_jsonb(arg, PG_ARGISNULL(i + 1), &result, val_type, false);
 	}
 
@@ -1295,7 +1295,7 @@ jsonb_build_array(PG_FUNCTION_ARGS)
 		if (val_type == InvalidOid || val_type == UNKNOWNOID)
 			ereport(ERROR,
 					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-			   errmsg("could not determine data type for argument %d", i + 1)));
+			errmsg("could not determine data type for argument %d", i + 1)));
 		add_jsonb(arg, PG_ARGISNULL(i), &result, val_type, false);
 	}
 
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index f1c3d9b7e01caf8db657f0460c98d29a37557ee4..d536b4b2fcc6f1edb0845cda0f3412068c5fa7ae 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -2538,7 +2538,7 @@ describeOneTableDetails(const char *schemaname,
 			printfPQExpBuffer(&buf,
 							  "SELECT pub.pubname\n"
 							  " FROM pg_catalog.pg_publication pub,\n"
-							  "      pg_catalog.pg_get_publication_tables(pub.pubname)\n"
+				  "      pg_catalog.pg_get_publication_tables(pub.pubname)\n"
 							  "WHERE relid = '%s'\n"
 							  "ORDER BY 1;",
 							  oid);
diff --git a/src/include/storage/procsignal.h b/src/include/storage/procsignal.h
index 553f0f43f7e01680f6b3a03de05e181463273473..8f0161bf77f206b9d5a274b0cefdab4844a16d5b 100644
--- a/src/include/storage/procsignal.h
+++ b/src/include/storage/procsignal.h
@@ -32,7 +32,8 @@ typedef enum
 	PROCSIG_CATCHUP_INTERRUPT,	/* sinval catchup interrupt */
 	PROCSIG_NOTIFY_INTERRUPT,	/* listen/notify interrupt */
 	PROCSIG_PARALLEL_MESSAGE,	/* message from cooperating parallel backend */
-	PROCSIG_WALSND_INIT_STOPPING,	/* ask walsenders to prepare for shutdown  */
+	PROCSIG_WALSND_INIT_STOPPING,		/* ask walsenders to prepare for
+										 * shutdown  */
 
 	/* Recovery conflict reasons */
 	PROCSIG_RECOVERY_CONFLICT_DATABASE,
diff --git a/src/interfaces/ecpg/ecpglib/pg_type.h b/src/interfaces/ecpg/ecpglib/pg_type.h
index a2f44324baaa3545f47b353427eb447935810a03..48ae4801290c117012db07fd73fcc0404959fe86 100644
--- a/src/interfaces/ecpg/ecpglib/pg_type.h
+++ b/src/interfaces/ecpg/ecpglib/pg_type.h
@@ -57,23 +57,23 @@
 #define ZPBITOID	 1560
 #define VARBITOID	  1562
 #define NUMERICOID		1700
-#define REFCURSOROID    1790
+#define REFCURSOROID	1790
 #define REGPROCEDUREOID 2202
-#define REGOPEROID      2203
-#define REGOPERATOROID  2204
-#define REGCLASSOID     2205
-#define REGTYPEOID      2206
-#define REGROLEOID      4096
-#define REGNAMESPACEOID     4089
+#define REGOPEROID		2203
+#define REGOPERATOROID	2204
+#define REGCLASSOID		2205
+#define REGTYPEOID		2206
+#define REGROLEOID		4096
+#define REGNAMESPACEOID		4089
 #define REGTYPEARRAYOID 2211
 #define UUIDOID 2950
-#define LSNOID          3220
-#define TSVECTOROID     3614
-#define GTSVECTOROID    3642
-#define TSQUERYOID      3615
-#define REGCONFIGOID    3734
-#define REGDICTIONARYOID    3769
+#define LSNOID			3220
+#define TSVECTOROID		3614
+#define GTSVECTOROID	3642
+#define TSQUERYOID		3615
+#define REGCONFIGOID	3734
+#define REGDICTIONARYOID	3769
 #define JSONBOID 3802
-#define INT4RANGEOID        3904
+#define INT4RANGEOID		3904
 
 #endif   /* PG_TYPE_H */
diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c
index d906abf9c8f645bac0623dea11f179aa998d9aa1..181eeea8351c0e30c48efbdaf155513dc1520ae4 100644
--- a/src/interfaces/libpq/fe-auth.c
+++ b/src/interfaces/libpq/fe-auth.c
@@ -419,7 +419,7 @@ pg_SSPI_startup(PGconn *conn, int use_negotiate, int payloadlen)
 	if (conn->sspictx)
 	{
 		printfPQExpBuffer(&conn->errorMessage,
-					libpq_gettext("duplicate SSPI authentication request\n"));
+				   libpq_gettext("duplicate SSPI authentication request\n"));
 		return STATUS_ERROR;
 	}
 
@@ -1218,7 +1218,7 @@ PQencryptPasswordConn(PGconn *conn, const char *passwd, const char *user,
 	else
 	{
 		printfPQExpBuffer(&conn->errorMessage,
-				   libpq_gettext("unrecognized password encryption algorithm \"%s\"\n"),
+		libpq_gettext("unrecognized password encryption algorithm \"%s\"\n"),
 						  algorithm);
 		return NULL;
 	}
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 1069e001bca3f4cb8cc03e6220e25f27d369c0d8..02ec8f0cea47a1c0fd78738be531fc70bbdf623c 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -1842,16 +1842,23 @@ connectDBComplete(PGconn *conn)
 				return 0;
 		}
 
-		if (ret == 1)	/* connect_timeout elapsed */
+		if (ret == 1)			/* connect_timeout elapsed */
 		{
-			/* If there are no more hosts, return (the error message is already set) */
+			/*
+			 * If there are no more hosts, return (the error message is
+			 * already set)
+			 */
 			if (++conn->whichhost >= conn->nconnhost)
 			{
 				conn->whichhost = 0;
 				conn->status = CONNECTION_BAD;
 				return 0;
 			}
-			/* Attempt connection to the next host, starting the connect_timeout timer */
+
+			/*
+			 * Attempt connection to the next host, starting the
+			 * connect_timeout timer
+			 */
 			pqDropConnection(conn, true);
 			conn->addr_cur = conn->connhost[conn->whichhost].addrlist;
 			conn->status = CONNECTION_NEEDED;