Subject: Improve pgindent's formatting named fields in struct literals and varidic functions

From: Andreas Karlsson <[email-masked]>
Date: Tue, 17 Feb 2026 09:09:05 +0100

Hi,

A personal pet peeve of mine has been how pgindent formats struct 
literals with named fields, for example the below:

static RBTNode sentinel =
{
     .color = RBTBLACK,.left = RBTNIL,.right = RBTNIL,.parent = NULL
};

The attached patch fixes the formatting to be nicer:

static RBTNode sentinel =
{
     .color = RBTBLACK, .left = RBTNIL, .right = RBTNIL, .parent = NULL
};

It is currently the only example but I mainly think that is because the 
current formatting looks ugly so we avoid putting struct literals on a 
single line. Plus I have seen this formatting in PostgreSQL extensions.

While fixing this personal annoyance I noticed that my fix also would 
fix the formatting of varidic functions. For example:

-errdetail(const char *fmt,...)
+errdetail(const char *fmt, ...)

What do you think? I think both are clear improvements to the 
readability and that the churn is not big enough to be an issue.

Andreas
From b460f140939023dfa8c7a3a39c1aa3881f819a2e Mon Sep 17 00:00:00 2001
From: Andreas Karlsson <[email-masked]>
Date: Tue, 17 Feb 2026 09:04:01 +0100
Subject: [PATCH v1 1/2] Make pgindent add a space between comma and period

Formatting of varidic functions and struct literals with named field
used to be ugly due to pgindent treaing period as always being binary
operator for struct access, but after comma it has a different meaning.
---
 src/tools/pg_bsd_indent/indent.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/tools/pg_bsd_indent/indent.c b/src/tools/pg_bsd_indent/indent.c
index 2622cc6227a..f4ea10c0ba8 100644
--- a/src/tools/pg_bsd_indent/indent.c
+++ b/src/tools/pg_bsd_indent/indent.c
@@ -1012,6 +1012,8 @@ check_type:
 
 	case period:		/* treat a period kind of like a binary
 				 * operation */
+	    if (ps.want_blank && ps.last_token == comma)
+	        *e_code++ = ' ';
 	    *e_code++ = '.';	/* move the period into line */
 	    ps.want_blank = false;	/* dont put a blank after a period */
 	    break;
-- 
2.47.3

From 4d40e5587bad8364c44392e63025eef52a85dfc5 Mon Sep 17 00:00:00 2001
From: Andreas Karlsson <[email-masked]>
Date: Tue, 17 Feb 2026 09:07:31 +0100
Subject: [PATCH v1 2/2] Run pgindent add a space between comma and period

---
 contrib/dblink/dblink.c                       |  4 +--
 contrib/fuzzystrmatch/dmetaphone.c            |  2 +-
 contrib/jsonb_plpython/jsonb_plpython.c       |  2 +-
 contrib/pgcrypto/px.c                         |  2 +-
 contrib/pgcrypto/px.h                         |  2 +-
 src/backend/access/index/amvalidate.c         |  2 +-
 src/backend/access/transam/xlogreader.c       |  4 +--
 src/backend/backup/basebackup_incremental.c   |  4 +--
 src/backend/backup/walsummary.c               |  2 +-
 src/backend/lib/rbtree.c                      |  2 +-
 src/backend/utils/error/elog.c                | 28 +++++++++----------
 src/backend/utils/error/jsonlog.c             |  4 +--
 src/backend/utils/misc/guc.c                  |  4 +--
 src/bin/pg_combinebackup/load_manifest.c      |  4 +--
 src/bin/pg_ctl/pg_ctl.c                       |  4 +--
 src/bin/pg_dump/filter.c                      |  2 +-
 src/bin/pg_dump/filter.h                      |  2 +-
 src/bin/pg_dump/pg_backup.h                   |  2 +-
 src/bin/pg_dump/pg_backup_archiver.c          |  6 ++--
 src/bin/pg_dump/pg_backup_archiver.h          |  4 +--
 src/bin/pg_dump/pg_backup_tar.c               |  4 +--
 src/bin/pg_upgrade/exec.c                     |  2 +-
 src/bin/pg_upgrade/parallel.c                 |  2 +-
 src/bin/pg_upgrade/pg_upgrade.h               | 16 +++++------
 src/bin/pg_upgrade/server.c                   |  2 +-
 src/bin/pg_upgrade/util.c                     | 10 +++----
 src/bin/pg_verifybackup/pg_verifybackup.c     |  8 +++---
 src/bin/pg_verifybackup/pg_verifybackup.h     |  4 +--
 src/bin/pg_walsummary/pg_walsummary.c         |  4 +--
 src/bin/psql/large_obj.c                      |  4 +--
 src/bin/psql/tab-complete.in.c                |  6 ++--
 src/common/logging.c                          |  2 +-
 src/common/percentrepl.c                      |  2 +-
 src/common/psprintf.c                         |  2 +-
 src/common/stringinfo.c                       |  2 +-
 src/include/access/amvalidate.h               |  2 +-
 src/include/backup/walsummary.h               |  2 +-
 src/include/common/blkreftable.h              |  2 +-
 src/include/common/fe_memutils.h              |  2 +-
 src/include/common/logging.h                  |  2 +-
 src/include/common/parse_manifest.h           |  2 +-
 src/include/common/percentrepl.h              |  2 +-
 src/include/jit/llvmjit_emit.h                |  8 +++---
 src/include/lib/stringinfo.h                  |  2 +-
 src/include/port.h                            | 10 +++----
 src/include/utils/elog.h                      | 28 +++++++++----------
 src/include/utils/palloc.h                    |  2 +-
 src/interfaces/ecpg/ecpglib/descriptor.c      |  6 ++--
 src/interfaces/ecpg/ecpglib/ecpglib_extern.h  |  2 +-
 src/interfaces/ecpg/ecpglib/execute.c         |  2 +-
 src/interfaces/ecpg/ecpglib/misc.c            |  2 +-
 src/interfaces/ecpg/include/ecpglib.h         |  8 +++---
 src/interfaces/ecpg/preproc/preproc_extern.h  |  6 ++--
 src/interfaces/ecpg/preproc/util.c            |  6 ++--
 src/interfaces/libpq-oauth/oauth-utils.c      |  2 +-
 src/interfaces/libpq-oauth/oauth-utils.h      |  2 +-
 src/interfaces/libpq/fe-exec.c                |  2 +-
 src/interfaces/libpq/fe-misc.c                |  4 +--
 src/interfaces/libpq/libpq-int.h              |  6 ++--
 src/interfaces/libpq/pqexpbuffer.c            |  4 +--
 src/interfaces/libpq/pqexpbuffer.h            |  4 +--
 src/pl/plpython/plpy_elog.c                   |  6 ++--
 src/pl/plpython/plpy_elog.h                   |  6 ++--
 src/port/open.c                               |  2 +-
 src/port/snprintf.c                           |  8 +++---
 src/port/win32security.c                      |  4 +--
 .../modules/libpq_pipeline/libpq_pipeline.c   |  4 +--
 src/test/regress/pg_regress.c                 | 12 ++++----
 src/timezone/zic.c                            |  8 +++---
 69 files changed, 163 insertions(+), 163 deletions(-)

diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c
index 2498d80c8e7..a246766cafb 100644
--- a/contrib/dblink/dblink.c
+++ b/contrib/dblink/dblink.c
@@ -122,7 +122,7 @@ static bool dblink_connstr_has_pw(const char *connstr);
 static void dblink_security_check(PGconn *conn, const char *connname,
 								  const char *connstr);
 static void dblink_res_error(PGconn *conn, const char *conname, PGresult *res,
-							 bool fail, const char *fmt,...) pg_attribute_printf(5, 6);
+							 bool fail, const char *fmt, ...) pg_attribute_printf(5, 6);
 static char *get_connect_string(const char *servername);
 static char *escape_param_str(const char *str);
 static void validate_pkattnums(Relation rel,
@@ -2787,7 +2787,7 @@ dblink_connstr_check(const char *connstr)
  */
 static void
 dblink_res_error(PGconn *conn, const char *conname, PGresult *res,
-				 bool fail, const char *fmt,...)
+				 bool fail, const char *fmt, ...)
 {
 	int			level;
 	char	   *pg_diag_sqlstate = PQresultErrorField(res, PG_DIAG_SQLSTATE);
diff --git a/contrib/fuzzystrmatch/dmetaphone.c b/contrib/fuzzystrmatch/dmetaphone.c
index 062667527c2..f94b4187e40 100644
--- a/contrib/fuzzystrmatch/dmetaphone.c
+++ b/contrib/fuzzystrmatch/dmetaphone.c
@@ -350,7 +350,7 @@ SetAt(metastring *s, int pos, char c)
    Caveats: the START value is 0 based
 */
 static int
-StringAt(metastring *s, int start, int length,...)
+StringAt(metastring *s, int start, int length, ...)
 {
 	char	   *test;
 	char	   *pos;
diff --git a/contrib/jsonb_plpython/jsonb_plpython.c b/contrib/jsonb_plpython/jsonb_plpython.c
index c2c4ce37c08..4de75a04e76 100644
--- a/contrib/jsonb_plpython/jsonb_plpython.c
+++ b/contrib/jsonb_plpython/jsonb_plpython.c
@@ -16,7 +16,7 @@ PG_MODULE_MAGIC_EXT(
 typedef char *(*PLyObject_AsString_t) (PyObject *plrv);
 static PLyObject_AsString_t PLyObject_AsString_p;
 
-typedef void (*PLy_elog_impl_t) (int elevel, const char *fmt,...);
+typedef void (*PLy_elog_impl_t) (int elevel, const char *fmt, ...);
 static PLy_elog_impl_t PLy_elog_impl_p;
 
 /*
diff --git a/contrib/pgcrypto/px.c b/contrib/pgcrypto/px.c
index f08bc498ac8..32f62f3fc1b 100644
--- a/contrib/pgcrypto/px.c
+++ b/contrib/pgcrypto/px.c
@@ -147,7 +147,7 @@ px_set_debug_handler(void (*handler) (const char *))
 }
 
 void
-px_debug(const char *fmt,...)
+px_debug(const char *fmt, ...)
 {
 	va_list		ap;
 
diff --git a/contrib/pgcrypto/px.h b/contrib/pgcrypto/px.h
index a09533a3582..440acf6a527 100644
--- a/contrib/pgcrypto/px.h
+++ b/contrib/pgcrypto/px.h
@@ -194,7 +194,7 @@ bool		CheckFIPSMode(void);
 void		CheckBuiltinCryptoMode(void);
 
 #ifdef PX_DEBUG
-void		px_debug(const char *fmt,...) pg_attribute_printf(1, 2);
+void		px_debug(const char *fmt, ...) pg_attribute_printf(1, 2);
 #else
 #define px_debug(...)
 #endif
diff --git a/src/backend/access/index/amvalidate.c b/src/backend/access/index/amvalidate.c
index f86ba7d76d2..96ef19e96ff 100644
--- a/src/backend/access/index/amvalidate.c
+++ b/src/backend/access/index/amvalidate.c
@@ -150,7 +150,7 @@ identify_opfamily_groups(CatCList *oprlist, CatCList *proclist)
  */
 bool
 check_amproc_signature(Oid funcid, Oid restype, bool exact,
-					   int minargs, int maxargs,...)
+					   int minargs, int maxargs, ...)
 {
 	bool		result = true;
 	HeapTuple	tp;
diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c
index 03ada8aa0c5..2f6c6ae18da 100644
--- a/src/backend/access/transam/xlogreader.c
+++ b/src/backend/access/transam/xlogreader.c
@@ -40,7 +40,7 @@
 #include "common/logging.h"
 #endif
 
-static void report_invalid_record(XLogReaderState *state, const char *fmt,...)
+static void report_invalid_record(XLogReaderState *state, const char *fmt, ...)
 			pg_attribute_printf(2, 3);
 static void allocate_recordbuf(XLogReaderState *state, uint32 reclength);
 static int	ReadPageInternal(XLogReaderState *state, XLogRecPtr pageptr,
@@ -69,7 +69,7 @@ static void WALOpenSegmentInit(WALOpenSegment *seg, WALSegmentContext *segcxt,
  * the current record being read.
  */
 static void
-report_invalid_record(XLogReaderState *state, const char *fmt,...)
+report_invalid_record(XLogReaderState *state, const char *fmt, ...)
 {
 	va_list		args;
 
diff --git a/src/backend/backup/basebackup_incremental.c b/src/backend/backup/basebackup_incremental.c
index f58ed9b198a..e377f4de28d 100644
--- a/src/backend/backup/basebackup_incremental.c
+++ b/src/backend/backup/basebackup_incremental.c
@@ -140,7 +140,7 @@ static void manifest_process_wal_range(JsonManifestParseContext *context,
 									   XLogRecPtr start_lsn,
 									   XLogRecPtr end_lsn);
 pg_noreturn static void manifest_report_error(JsonManifestParseContext *context,
-											  const char *fmt,...)
+											  const char *fmt, ...)
 			pg_attribute_printf(2, 3);
 static int	compare_block_numbers(const void *a, const void *b);
 
@@ -1020,7 +1020,7 @@ manifest_process_wal_range(JsonManifestParseContext *context,
  * manifest.
  */
 static void
-manifest_report_error(JsonManifestParseContext *context, const char *fmt,...)
+manifest_report_error(JsonManifestParseContext *context, const char *fmt, ...)
 {
 	StringInfoData errbuf;
 
diff --git a/src/backend/backup/walsummary.c b/src/backend/backup/walsummary.c
index 4cd1824fbc6..0cdc86af30b 100644
--- a/src/backend/backup/walsummary.c
+++ b/src/backend/backup/walsummary.c
@@ -319,7 +319,7 @@ WriteWalSummary(void *wal_summary_io, void *data, int length)
  * Error-reporting callback for use with CreateBlockRefTableReader.
  */
 void
-ReportWalSummaryError(void *callback_arg, char *fmt,...)
+ReportWalSummaryError(void *callback_arg, char *fmt, ...)
 {
 	StringInfoData buf;
 	va_list		ap;
diff --git a/src/backend/lib/rbtree.c b/src/backend/lib/rbtree.c
index d7b410d4430..036f3478062 100644
--- a/src/backend/lib/rbtree.c
+++ b/src/backend/lib/rbtree.c
@@ -62,7 +62,7 @@ struct RBTree
 
 static RBTNode sentinel =
 {
-	.color = RBTBLACK,.left = RBTNIL,.right = RBTNIL,.parent = NULL
+	.color = RBTBLACK, .left = RBTNIL, .right = RBTNIL, .parent = NULL
 };

diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index 59315e94e3e..a94410dcbdb 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -1078,7 +1078,7 @@ errcode_for_socket_access(void)
  * ereport will provide one for the output methods that need it.
  */
 int
-errmsg(const char *fmt,...)
+errmsg(const char *fmt, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1168,7 +1168,7 @@ set_backtrace(ErrorData *edata, int num_skip)
  * error recursion.
  */
 int
-errmsg_internal(const char *fmt,...)
+errmsg_internal(const char *fmt, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1192,7 +1192,7 @@ errmsg_internal(const char *fmt,...)
  */
 int
 errmsg_plural(const char *fmt_singular, const char *fmt_plural,
-			  unsigned long n,...)
+			  unsigned long n, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1214,7 +1214,7 @@ errmsg_plural(const char *fmt_singular, const char *fmt_plural,
  * errdetail --- add a detail error message text to the current error
  */
 int
-errdetail(const char *fmt,...)
+errdetail(const char *fmt, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1241,7 +1241,7 @@ errdetail(const char *fmt,...)
  * (typically, that they don't seem to be useful to average users).
  */
 int
-errdetail_internal(const char *fmt,...)
+errdetail_internal(const char *fmt, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1262,7 +1262,7 @@ errdetail_internal(const char *fmt,...)
  * errdetail_log --- add a detail_log error message text to the current error
  */
 int
-errdetail_log(const char *fmt,...)
+errdetail_log(const char *fmt, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1284,7 +1284,7 @@ errdetail_log(const char *fmt,...)
  */
 int
 errdetail_log_plural(const char *fmt_singular, const char *fmt_plural,
-					 unsigned long n,...)
+					 unsigned long n, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1307,7 +1307,7 @@ errdetail_log_plural(const char *fmt_singular, const char *fmt_plural,
  */
 int
 errdetail_plural(const char *fmt_singular, const char *fmt_plural,
-				 unsigned long n,...)
+				 unsigned long n, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1328,7 +1328,7 @@ errdetail_plural(const char *fmt_singular, const char *fmt_plural,
  * errhint --- add a hint error message text to the current error
  */
 int
-errhint(const char *fmt,...)
+errhint(const char *fmt, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1350,7 +1350,7 @@ errhint(const char *fmt,...)
  * Non-translated version of errhint(), see also errmsg_internal().
  */
 int
-errhint_internal(const char *fmt,...)
+errhint_internal(const char *fmt, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1372,7 +1372,7 @@ errhint_internal(const char *fmt,...)
  */
 int
 errhint_plural(const char *fmt_singular, const char *fmt_plural,
-			   unsigned long n,...)
+			   unsigned long n, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1397,7 +1397,7 @@ errhint_plural(const char *fmt_singular, const char *fmt_plural,
  * states.
  */
 int
-errcontext_msg(const char *fmt,...)
+errcontext_msg(const char *fmt, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1669,7 +1669,7 @@ pre_format_elog_string(int errnumber, const char *domain)
 }
 
 char *
-format_elog_string(const char *fmt,...)
+format_elog_string(const char *fmt, ...)
 {
 	ErrorData	errdata;
 	ErrorData  *edata;
@@ -4041,7 +4041,7 @@ append_with_tabs(StringInfo buf, const char *str)
  * safely (memory context, GUC load etc)
  */
 void
-write_stderr(const char *fmt,...)
+write_stderr(const char *fmt, ...)
 {
 	va_list		ap;
 
diff --git a/src/backend/utils/error/jsonlog.c b/src/backend/utils/error/jsonlog.c
index 2ff6a004046..e5ba22794d2 100644
--- a/src/backend/utils/error/jsonlog.c
+++ b/src/backend/utils/error/jsonlog.c
@@ -30,7 +30,7 @@
 
 static void appendJSONKeyValueFmt(StringInfo buf, const char *key,
 								  bool escape_key,
-								  const char *fmt,...) pg_attribute_printf(4, 5);
+								  const char *fmt, ...) pg_attribute_printf(4, 5);
 
 /*
  * appendJSONKeyValue
@@ -68,7 +68,7 @@ appendJSONKeyValue(StringInfo buf, const char *key, const char *value,
  */
 static void
 appendJSONKeyValueFmt(StringInfo buf, const char *key,
-					  bool escape_key, const char *fmt,...)
+					  bool escape_key, const char *fmt, ...)
 {
 	int			save_errno = errno;
 	size_t		len = 128;		/* initial assumption about buffer size */
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index ae9d5f3fb70..8bb5394175f 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -260,7 +260,7 @@ static bool valid_custom_variable_name(const char *name);
 static bool assignable_custom_variable_name(const char *name, bool skip_errors,
 											int elevel);
 static void do_serialize(char **destptr, Size *maxbytes,
-						 const char *fmt,...) pg_attribute_printf(3, 4);
+						 const char *fmt, ...) pg_attribute_printf(3, 4);
 static bool call_bool_check_hook(const struct config_generic *conf, bool *newval,
 								 void **extra, GucSource source, int elevel);
 static bool call_int_check_hook(const struct config_generic *conf, int *newval,
@@ -5845,7 +5845,7 @@ EstimateGUCStateSpace(void)
  * maxbytes is not sufficient to copy the string, error out.
  */
 static void
-do_serialize(char **destptr, Size *maxbytes, const char *fmt,...)
+do_serialize(char **destptr, Size *maxbytes, const char *fmt, ...)
 {
 	va_list		vargs;
 	int			n;
diff --git a/src/bin/pg_combinebackup/load_manifest.c b/src/bin/pg_combinebackup/load_manifest.c
index c363ac6187e..5d2c52b3c31 100644
--- a/src/bin/pg_combinebackup/load_manifest.c
+++ b/src/bin/pg_combinebackup/load_manifest.c
@@ -69,7 +69,7 @@ static void combinebackup_per_wal_range_cb(JsonManifestParseContext *context,
 										   XLogRecPtr start_lsn,
 										   XLogRecPtr end_lsn);
 pg_noreturn static void report_manifest_error(JsonManifestParseContext *context,
-											  const char *fmt,...)
+											  const char *fmt, ...)
 			pg_attribute_printf(2, 3);
 
 /*
@@ -225,7 +225,7 @@ load_backup_manifest(char *backup_directory)
  * expects this function not to return.
  */
 static void
-report_manifest_error(JsonManifestParseContext *context, const char *fmt,...)
+report_manifest_error(JsonManifestParseContext *context, const char *fmt, ...)
 {
 	va_list		ap;
 
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c
index 122856b599e..d542651433d 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -114,7 +114,7 @@ static HANDLE shutdownHandles[2];
 #endif

-static void write_stderr(const char *fmt,...) pg_attribute_printf(1, 2);
+static void write_stderr(const char *fmt, ...) pg_attribute_printf(1, 2);
 static void do_advice(void);
 static void do_help(void);
 static void set_mode(char *modeopt);
@@ -200,7 +200,7 @@ write_eventlog(int level, const char *line)
  * not available).
  */
 static void
-write_stderr(const char *fmt,...)
+write_stderr(const char *fmt, ...)
 {
 	va_list		ap;
 
diff --git a/src/bin/pg_dump/filter.c b/src/bin/pg_dump/filter.c
index fbff69d4f7e..8aa3810cb08 100644
--- a/src/bin/pg_dump/filter.c
+++ b/src/bin/pg_dump/filter.c
@@ -151,7 +151,7 @@ get_object_type(const char *keyword, int size, FilterObjectType *objtype)

 void
-pg_log_filter_error(FilterStateData *fstate, const char *fmt,...)
+pg_log_filter_error(FilterStateData *fstate, const char *fmt, ...)
 {
 	va_list		argp;
 	char		buf[256];
diff --git a/src/bin/pg_dump/filter.h b/src/bin/pg_dump/filter.h
index b87cd6dec58..0cf0d22d159 100644
--- a/src/bin/pg_dump/filter.h
+++ b/src/bin/pg_dump/filter.h
@@ -63,7 +63,7 @@ typedef enum
 extern const char *filter_object_type_name(FilterObjectType fot);
 extern void filter_init(FilterStateData *fstate, const char *filename, exit_function f_exit);
 extern void filter_free(FilterStateData *fstate);
-extern void pg_log_filter_error(FilterStateData *fstate, const char *fmt,...)
+extern void pg_log_filter_error(FilterStateData *fstate, const char *fmt, ...)
 			pg_attribute_printf(2, 3);
 extern bool filter_read_item(FilterStateData *fstate, char **objname,
 							 FilterCommandType *comtype, FilterObjectType *objtype);
diff --git a/src/bin/pg_dump/pg_backup.h b/src/bin/pg_dump/pg_backup.h
index 2f8d9799c30..c7bdda1deed 100644
--- a/src/bin/pg_dump/pg_backup.h
+++ b/src/bin/pg_dump/pg_backup.h
@@ -339,7 +339,7 @@ extern void SortTocFromFile(Archive *AHX);
 
 /* Convenience functions used only when writing DATA */
 extern void archputs(const char *s, Archive *AH);
-extern int	archprintf(Archive *AH, const char *fmt,...) pg_attribute_printf(2, 3);
+extern int	archprintf(Archive *AH, const char *fmt, ...) pg_attribute_printf(2, 3);
 
 #define appendStringLiteralAH(buf,str,AH) \
 	appendStringLiteral(buf, str, (AH)->encoding, (AH)->std_strings)
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index 7afcc0859c8..57fcf2e0f1a 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -1655,7 +1655,7 @@ archputs(const char *s, Archive *AH)
 
 /* Public */
 int
-archprintf(Archive *AH, const char *fmt,...)
+archprintf(Archive *AH, const char *fmt, ...)
 {
 	int			save_errno = errno;
 	char	   *p;
@@ -1755,7 +1755,7 @@ RestoreOutput(ArchiveHandle *AH, CompressFileHandle *savedOutput)
  *	Print formatted text to the output file (usually stdout).
  */
 int
-ahprintf(ArchiveHandle *AH, const char *fmt,...)
+ahprintf(ArchiveHandle *AH, const char *fmt, ...)
 {
 	int			save_errno = errno;
 	char	   *p;
@@ -1893,7 +1893,7 @@ ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH)
 
 /* on some error, we may decide to go on... */
 void
-warn_or_exit_horribly(ArchiveHandle *AH, const char *fmt,...)
+warn_or_exit_horribly(ArchiveHandle *AH, const char *fmt, ...)
 {
 	va_list		ap;
 
diff --git a/src/bin/pg_dump/pg_backup_archiver.h b/src/bin/pg_dump/pg_backup_archiver.h
index 325b53fc9bd..e329e7718f6 100644
--- a/src/bin/pg_dump/pg_backup_archiver.h
+++ b/src/bin/pg_dump/pg_backup_archiver.h
@@ -395,7 +395,7 @@ struct _tocEntry
 extern int	parallel_restore(ArchiveHandle *AH, TocEntry *te);
 extern void on_exit_close_archive(Archive *AHX);
 
-extern void warn_or_exit_horribly(ArchiveHandle *AH, const char *fmt,...) pg_attribute_printf(2, 3);
+extern void warn_or_exit_horribly(ArchiveHandle *AH, const char *fmt, ...) pg_attribute_printf(2, 3);
 
 /* Options for ArchiveEntry */
 typedef struct _archiveOpts
@@ -473,6 +473,6 @@ extern void IssueACLPerBlob(ArchiveHandle *AH, TocEntry *te);
 extern void DropLOIfExists(ArchiveHandle *AH, Oid oid);
 
 void		ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH);
-int			ahprintf(ArchiveHandle *AH, const char *fmt,...) pg_attribute_printf(2, 3);
+int			ahprintf(ArchiveHandle *AH, const char *fmt, ...) pg_attribute_printf(2, 3);
 
 #endif
diff --git a/src/bin/pg_dump/pg_backup_tar.c b/src/bin/pg_dump/pg_backup_tar.c
index b5ba3b46dd9..89505f11952 100644
--- a/src/bin/pg_dump/pg_backup_tar.c
+++ b/src/bin/pg_dump/pg_backup_tar.c
@@ -102,7 +102,7 @@ static void tarClose(ArchiveHandle *AH, TAR_MEMBER *th);
 #ifdef __NOT_USED__
 static char *tarGets(char *buf, size_t len, TAR_MEMBER *th);
 #endif
-static int	tarPrintf(TAR_MEMBER *th, const char *fmt,...) pg_attribute_printf(2, 3);
+static int	tarPrintf(TAR_MEMBER *th, const char *fmt, ...) pg_attribute_printf(2, 3);
 
 static void _tarAddFile(ArchiveHandle *AH, TAR_MEMBER *th);
 static TAR_MEMBER *_tarPositionTo(ArchiveHandle *AH, const char *filename);
@@ -951,7 +951,7 @@ _EndLOs(ArchiveHandle *AH, TocEntry *te)
  */
 
 static int
-tarPrintf(TAR_MEMBER *th, const char *fmt,...)
+tarPrintf(TAR_MEMBER *th, const char *fmt, ...)
 {
 	int			save_errno = errno;
 	char	   *p;
diff --git a/src/bin/pg_upgrade/exec.c b/src/bin/pg_upgrade/exec.c
index e1de61f36ee..563b4a6b5fa 100644
--- a/src/bin/pg_upgrade/exec.c
+++ b/src/bin/pg_upgrade/exec.c
@@ -84,7 +84,7 @@ get_bin_version(ClusterInfo *cluster)
  */
 bool
 exec_prog(const char *log_filename, const char *opt_log_file,
-		  bool report_error, bool exit_on_error, const char *fmt,...)
+		  bool report_error, bool exit_on_error, const char *fmt, ...)
 {
 	int			result = 0;
 	int			written;
diff --git a/src/bin/pg_upgrade/parallel.c b/src/bin/pg_upgrade/parallel.c
index 6945f71fcf1..8ccbc164132 100644
--- a/src/bin/pg_upgrade/parallel.c
+++ b/src/bin/pg_upgrade/parallel.c
@@ -61,7 +61,7 @@ DWORD		win32_transfer_all_new_dbs(transfer_thread_arg *args);
  */
 void
 parallel_exec_prog(const char *log_file, const char *opt_log_file,
-				   const char *fmt,...)
+				   const char *fmt, ...)
 {
 	va_list		args;
 	char		cmd[MAX_STRING];
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index ec018e4f292..0be1d3c1761 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -414,7 +414,7 @@ void		generate_old_dump(void);
 #define EXEC_PSQL_ARGS "--echo-queries --set ON_ERROR_STOP=on --no-psqlrc --dbname=template1"
 
 bool		exec_prog(const char *log_filename, const char *opt_log_file,
-					  bool report_error, bool exit_on_error, const char *fmt,...) pg_attribute_printf(5, 6);
+					  bool report_error, bool exit_on_error, const char *fmt, ...) pg_attribute_printf(5, 6);
 void		verify_directories(void);
 bool		pid_lock_file_exists(const char *datadir);
 
@@ -474,7 +474,7 @@ void		init_tablespaces(void);
 /* server.c */
 
 PGconn	   *connectToServer(ClusterInfo *cluster, const char *db_name);
-PGresult   *executeQueryOrDie(PGconn *conn, const char *fmt,...) pg_attribute_printf(2, 3);
+PGresult   *executeQueryOrDie(PGconn *conn, const char *fmt, ...) pg_attribute_printf(2, 3);
 
 char	   *cluster_conn_opts(ClusterInfo *cluster);
 
@@ -488,13 +488,13 @@ void		check_pghost_envvar(void);
 char	   *quote_identifier(const char *s);
 int			get_user_info(char **user_name_p);
 void		check_ok(void);
-void		report_status(eLogType type, const char *fmt,...) pg_attribute_printf(2, 3);
-void		pg_log(eLogType type, const char *fmt,...) pg_attribute_printf(2, 3);
-pg_noreturn void pg_fatal(const char *fmt,...) pg_attribute_printf(1, 2);
+void		report_status(eLogType type, const char *fmt, ...) pg_attribute_printf(2, 3);
+void		pg_log(eLogType type, const char *fmt, ...) pg_attribute_printf(2, 3);
+pg_noreturn void pg_fatal(const char *fmt, ...) pg_attribute_printf(1, 2);
 void		end_progress_output(void);
 void		cleanup_output_dirs(void);
-void		prep_status(const char *fmt,...) pg_attribute_printf(1, 2);
-void		prep_status_progress(const char *fmt,...) pg_attribute_printf(1, 2);
+void		prep_status(const char *fmt, ...) pg_attribute_printf(1, 2);
+void		prep_status_progress(const char *fmt, ...) pg_attribute_printf(1, 2);
 unsigned int str2uint(const char *str);

@@ -511,7 +511,7 @@ MultiXactOffset rewrite_multixacts(MultiXactId from_multi, MultiXactId to_multi)
 
 /* parallel.c */
 void		parallel_exec_prog(const char *log_file, const char *opt_log_file,
-							   const char *fmt,...) pg_attribute_printf(3, 4);
+							   const char *fmt, ...) pg_attribute_printf(3, 4);
 void		parallel_transfer_all_new_dbs(DbInfoArr *old_db_arr, DbInfoArr *new_db_arr,
 										  char *old_pgdata, char *new_pgdata,
 										  char *old_tablespace, char *new_tablespace);
diff --git a/src/bin/pg_upgrade/server.c b/src/bin/pg_upgrade/server.c
index eeeac3153f0..959fcdf7b69 100644
--- a/src/bin/pg_upgrade/server.c
+++ b/src/bin/pg_upgrade/server.c
@@ -119,7 +119,7 @@ cluster_conn_opts(ClusterInfo *cluster)
  *	message and calls exit() to kill the program.
  */
 PGresult *
-executeQueryOrDie(PGconn *conn, const char *fmt,...)
+executeQueryOrDie(PGconn *conn, const char *fmt, ...)
 {
 	static char query[QUERY_ALLOC];
 	va_list		args;
diff --git a/src/bin/pg_upgrade/util.c b/src/bin/pg_upgrade/util.c
index 0f47ed771d5..08d6385b512 100644
--- a/src/bin/pg_upgrade/util.c
+++ b/src/bin/pg_upgrade/util.c
@@ -29,7 +29,7 @@ static void pg_log_v(eLogType type, const char *fmt, va_list ap) pg_attribute_pr
  *	results and other messages.
  */
 void
-report_status(eLogType type, const char *fmt,...)
+report_status(eLogType type, const char *fmt, ...)
 {
 	va_list		args;
 
@@ -126,7 +126,7 @@ cleanup_output_dirs(void)
  *		  pg_log(PG_FATAL, "failed: %s", message);
  */
 void
-prep_status(const char *fmt,...)
+prep_status(const char *fmt, ...)
 {
 	va_list		args;
 	char		message[MAX_STRING];
@@ -153,7 +153,7 @@ prep_status(const char *fmt,...)
  *   report_status(PG_REPORT, "ok");
  */
 void
-prep_status_progress(const char *fmt,...)
+prep_status_progress(const char *fmt, ...)
 {
 	va_list		args;
 	char		message[MAX_STRING];
@@ -256,7 +256,7 @@ pg_log_v(eLogType type, const char *fmt, va_list ap)

 void
-pg_log(eLogType type, const char *fmt,...)
+pg_log(eLogType type, const char *fmt, ...)
 {
 	va_list		args;
 
@@ -267,7 +267,7 @@ pg_log(eLogType type, const char *fmt,...)

 void
-pg_fatal(const char *fmt,...)
+pg_fatal(const char *fmt, ...)
 {
 	va_list		args;
 
diff --git a/src/bin/pg_verifybackup/pg_verifybackup.c b/src/bin/pg_verifybackup/pg_verifybackup.c
index f9f2d457f2f..18c1679284b 100644
--- a/src/bin/pg_verifybackup/pg_verifybackup.c
+++ b/src/bin/pg_verifybackup/pg_verifybackup.c
@@ -71,7 +71,7 @@ static void verifybackup_per_wal_range_cb(JsonManifestParseContext *context,
 										  XLogRecPtr start_lsn,
 										  XLogRecPtr end_lsn);
 pg_noreturn static void report_manifest_error(JsonManifestParseContext *context,
-											  const char *fmt,...)
+											  const char *fmt, ...)
 			pg_attribute_printf(2, 3);
 
 static void verify_tar_backup(verifier_context *context, DIR *dir);
@@ -506,7 +506,7 @@ parse_manifest_file(char *manifest_path)
  * expects this function not to return.
  */
 static void
-report_manifest_error(JsonManifestParseContext *context, const char *fmt,...)
+report_manifest_error(JsonManifestParseContext *context, const char *fmt, ...)
 {
 	va_list		ap;
 
@@ -1228,7 +1228,7 @@ parse_required_wal(verifier_context *context, char *pg_waldump_path,
  * context says we should.
  */
 void
-report_backup_error(verifier_context *context, const char *pg_restrict fmt,...)
+report_backup_error(verifier_context *context, const char *pg_restrict fmt, ...)
 {
 	va_list		ap;
 
@@ -1245,7 +1245,7 @@ report_backup_error(verifier_context *context, const char *pg_restrict fmt,...)
  * Report a fatal error and exit
  */
 void
-report_fatal_error(const char *pg_restrict fmt,...)
+report_fatal_error(const char *pg_restrict fmt, ...)
 {
 	va_list		ap;
 
diff --git a/src/bin/pg_verifybackup/pg_verifybackup.h b/src/bin/pg_verifybackup/pg_verifybackup.h
index a99d9bfd581..8572c1433dc 100644
--- a/src/bin/pg_verifybackup/pg_verifybackup.h
+++ b/src/bin/pg_verifybackup/pg_verifybackup.h
@@ -96,9 +96,9 @@ typedef struct verifier_context
 } verifier_context;
 
 extern void report_backup_error(verifier_context *context,
-								const char *pg_restrict fmt,...)
+								const char *pg_restrict fmt, ...)
 			pg_attribute_printf(2, 3);
-pg_noreturn extern void report_fatal_error(const char *pg_restrict fmt,...)
+pg_noreturn extern void report_fatal_error(const char *pg_restrict fmt, ...)
 			pg_attribute_printf(1, 2);
 extern bool should_ignore_relpath(verifier_context *context,
 								  const char *relpath);
diff --git a/src/bin/pg_walsummary/pg_walsummary.c b/src/bin/pg_walsummary/pg_walsummary.c
index aa214b8616d..c3e98ffe55e 100644
--- a/src/bin/pg_walsummary/pg_walsummary.c
+++ b/src/bin/pg_walsummary/pg_walsummary.c
@@ -43,7 +43,7 @@ static void help(const char *progname);
 static int	compare_block_numbers(const void *a, const void *b);
 static int	walsummary_read_callback(void *callback_arg, void *data,
 									 int length);
-static void walsummary_error_callback(void *callback_arg, char *fmt,...) pg_attribute_printf(2, 3);
+static void walsummary_error_callback(void *callback_arg, char *fmt, ...) pg_attribute_printf(2, 3);
 
 /*
  * Main program.
@@ -227,7 +227,7 @@ compare_block_numbers(const void *a, const void *b)
  * Error callback.
  */
 void
-walsummary_error_callback(void *callback_arg, char *fmt,...)
+walsummary_error_callback(void *callback_arg, char *fmt, ...)
 {
 	va_list		ap;
 
diff --git a/src/bin/psql/large_obj.c b/src/bin/psql/large_obj.c
index 021f78e0f78..c961300fe98 100644
--- a/src/bin/psql/large_obj.c
+++ b/src/bin/psql/large_obj.c
@@ -13,10 +13,10 @@
 #include "large_obj.h"
 #include "settings.h"
 
-static void print_lo_result(const char *fmt,...) pg_attribute_printf(1, 2);
+static void print_lo_result(const char *fmt, ...) pg_attribute_printf(1, 2);
 
 static void
-print_lo_result(const char *fmt,...)
+print_lo_result(const char *fmt, ...)
 {
 	va_list		ap;
 
diff --git a/src/bin/psql/tab-complete.in.c b/src/bin/psql/tab-complete.in.c
index 8b91bc00062..b90f3128d54 100644
--- a/src/bin/psql/tab-complete.in.c
+++ b/src/bin/psql/tab-complete.in.c
@@ -1679,7 +1679,7 @@ TailMatchesArray(bool case_sensitive,
 static bool
 TailMatchesImpl(bool case_sensitive,
 				int previous_words_count, char **previous_words,
-				int narg,...)
+				int narg, ...)
 {
 	const char *argarray[64];
 	va_list		args;
@@ -1729,7 +1729,7 @@ HeadMatchesArray(bool case_sensitive,
 static bool
 HeadMatchesImpl(bool case_sensitive,
 				int previous_words_count, char **previous_words,
-				int narg,...)
+				int narg, ...)
 {
 	const char *argarray[64];
 	va_list		args;
@@ -1816,7 +1816,7 @@ MatchesArray(bool case_sensitive,
 static bool
 MatchesImpl(bool case_sensitive,
 			int previous_words_count, char **previous_words,
-			int narg,...)
+			int narg, ...)
 {
 	const char *argarray[64];
 	va_list		args;
diff --git a/src/common/logging.c b/src/common/logging.c
index 5206949e5d8..bfd7e5076bc 100644
--- a/src/common/logging.c
+++ b/src/common/logging.c
@@ -206,7 +206,7 @@ pg_logging_set_locus_callback(void (*cb) (const char **filename, uint64 *lineno)
 
 void
 pg_log_generic(enum pg_log_level level, enum pg_log_part part,
-			   const char *pg_restrict fmt,...)
+			   const char *pg_restrict fmt, ...)
 {
 	va_list		ap;
 
diff --git a/src/common/percentrepl.c b/src/common/percentrepl.c
index 525a5ba6cf0..70bbfabd117 100644
--- a/src/common/percentrepl.c
+++ b/src/common/percentrepl.c
@@ -56,7 +56,7 @@
  * revised.
  */
 char *
-replace_percent_placeholders(const char *instr, const char *param_name, const char *letters,...)
+replace_percent_placeholders(const char *instr, const char *param_name, const char *letters, ...)
 {
 	StringInfoData result;
 
diff --git a/src/common/psprintf.c b/src/common/psprintf.c
index 6f006e0262f..29b09732a5a 100644
--- a/src/common/psprintf.c
+++ b/src/common/psprintf.c
@@ -40,7 +40,7 @@
  * One should therefore think twice about using this in libpq.
  */
 char *
-psprintf(const char *fmt,...)
+psprintf(const char *fmt, ...)
 {
 	int			save_errno = errno;
 	size_t		len = 128;		/* initial assumption about buffer size */
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c
index ae39540e468..468954e484e 100644
--- a/src/common/stringinfo.c
+++ b/src/common/stringinfo.c
@@ -142,7 +142,7 @@ resetStringInfo(StringInfo str)
  * strcat.
  */
 void
-appendStringInfo(StringInfo str, const char *fmt,...)
+appendStringInfo(StringInfo str, const char *fmt, ...)
 {
 	int			save_errno = errno;
 
diff --git a/src/include/access/amvalidate.h b/src/include/access/amvalidate.h
index b82998778ac..debd1ed37a4 100644
--- a/src/include/access/amvalidate.h
+++ b/src/include/access/amvalidate.h
@@ -29,7 +29,7 @@ typedef struct OpFamilyOpFuncGroup
 /* Functions in access/index/amvalidate.c */
 extern List *identify_opfamily_groups(CatCList *oprlist, CatCList *proclist);
 extern bool check_amproc_signature(Oid funcid, Oid restype, bool exact,
-								   int minargs, int maxargs,...);
+								   int minargs, int maxargs, ...);
 extern bool check_amoptsproc_signature(Oid funcid);
 extern bool check_amop_signature(Oid opno, Oid restype,
 								 Oid lefttype, Oid righttype);
diff --git a/src/include/backup/walsummary.h b/src/include/backup/walsummary.h
index 60157e0ac50..093b42df473 100644
--- a/src/include/backup/walsummary.h
+++ b/src/include/backup/walsummary.h
@@ -44,6 +44,6 @@ extern void RemoveWalSummaryIfOlderThan(WalSummaryFile *ws,
 
 extern int	ReadWalSummary(void *wal_summary_io, void *data, int length);
 extern int	WriteWalSummary(void *wal_summary_io, void *data, int length);
-extern void ReportWalSummaryError(void *callback_arg, char *fmt,...) pg_attribute_printf(2, 3);
+extern void ReportWalSummaryError(void *callback_arg, char *fmt, ...) pg_attribute_printf(2, 3);
 
 #endif							/* WALSUMMARY_H */
diff --git a/src/include/common/blkreftable.h b/src/include/common/blkreftable.h
index b5b5517f660..42b11b0a2b1 100644
--- a/src/include/common/blkreftable.h
+++ b/src/include/common/blkreftable.h
@@ -44,7 +44,7 @@ typedef struct BlockRefTableWriter BlockRefTableWriter;
  * report_error_fn should not return.
  */
 typedef int (*io_callback_fn) (void *callback_arg, void *data, int length);
-typedef void (*report_error_fn) (void *callback_arg, char *msg,...) pg_attribute_printf(2, 3);
+typedef void (*report_error_fn) (void *callback_arg, char *msg, ...) pg_attribute_printf(2, 3);

 /*
diff --git a/src/include/common/fe_memutils.h b/src/include/common/fe_memutils.h
index eccdfcab086..b786eaf48b0 100644
--- a/src/include/common/fe_memutils.h
+++ b/src/include/common/fe_memutils.h
@@ -79,7 +79,7 @@ extern void pfree(void *pointer);
 #define repalloc_array(pointer, type, count) ((type *) repalloc(pointer, sizeof(type) * (count)))
 
 /* sprintf into a palloc'd buffer --- these are in psprintf.c */
-extern char *psprintf(const char *fmt,...) pg_attribute_printf(1, 2);
+extern char *psprintf(const char *fmt, ...) pg_attribute_printf(1, 2);
 extern size_t pvsnprintf(char *buf, size_t len, const char *fmt, va_list args) pg_attribute_printf(3, 0);
 
 #endif							/* FE_MEMUTILS_H */
diff --git a/src/include/common/logging.h b/src/include/common/logging.h
index bccba4ac07b..b8f76a88dbe 100644
--- a/src/include/common/logging.h
+++ b/src/include/common/logging.h
@@ -93,7 +93,7 @@ void		pg_logging_set_pre_callback(void (*cb) (void));
 void		pg_logging_set_locus_callback(void (*cb) (const char **filename, uint64 *lineno));
 
 void		pg_log_generic(enum pg_log_level level, enum pg_log_part part,
-						   const char *pg_restrict fmt,...)
+						   const char *pg_restrict fmt, ...)
 			pg_attribute_printf(3, 4);
 void		pg_log_generic_v(enum pg_log_level level, enum pg_log_part part,
 							 const char *pg_restrict fmt, va_list ap)
diff --git a/src/include/common/parse_manifest.h b/src/include/common/parse_manifest.h
index 35a3b5ca66c..95ba885afe6 100644
--- a/src/include/common/parse_manifest.h
+++ b/src/include/common/parse_manifest.h
@@ -34,7 +34,7 @@ typedef void (*json_manifest_per_wal_range_callback) (JsonManifestParseContext *
 													  TimeLineID tli,
 													  XLogRecPtr start_lsn, XLogRecPtr end_lsn);
 typedef void (*json_manifest_error_callback) (JsonManifestParseContext *,
-											  const char *fmt,...) pg_attribute_printf(2, 3);
+											  const char *fmt, ...) pg_attribute_printf(2, 3);
 
 struct JsonManifestParseContext
 {
diff --git a/src/include/common/percentrepl.h b/src/include/common/percentrepl.h
index 9c0322dd446..9e7727f63a2 100644
--- a/src/include/common/percentrepl.h
+++ b/src/include/common/percentrepl.h
@@ -13,6 +13,6 @@
 #ifndef PERCENTREPL_H
 #define PERCENTREPL_H
 
-extern char *replace_percent_placeholders(const char *instr, const char *param_name, const char *letters,...);
+extern char *replace_percent_placeholders(const char *instr, const char *param_name, const char *letters, ...);
 
 #endif							/* PERCENTREPL_H */
diff --git a/src/include/jit/llvmjit_emit.h b/src/include/jit/llvmjit_emit.h
index 089945391ee..0e089b9569b 100644
--- a/src/include/jit/llvmjit_emit.h
+++ b/src/include/jit/llvmjit_emit.h
@@ -159,14 +159,14 @@ l_load_gep1(LLVMBuilderRef b, LLVMTypeRef t, LLVMValueRef v, LLVMValueRef idx, c
 }
 
 /* separate, because pg_attribute_printf(2, 3) can't appear in definition */
-static inline LLVMBasicBlockRef l_bb_before_v(LLVMBasicBlockRef r, const char *fmt,...) pg_attribute_printf(2, 3);
+static inline LLVMBasicBlockRef l_bb_before_v(LLVMBasicBlockRef r, const char *fmt, ...) pg_attribute_printf(2, 3);
 
 /*
  * Insert a new basic block, just before r, the name being determined by fmt
  * and arguments.
  */
 static inline LLVMBasicBlockRef
-l_bb_before_v(LLVMBasicBlockRef r, const char *fmt,...)
+l_bb_before_v(LLVMBasicBlockRef r, const char *fmt, ...)
 {
 	char		buf[512];
 	va_list		args;
@@ -182,14 +182,14 @@ l_bb_before_v(LLVMBasicBlockRef r, const char *fmt,...)
 }
 
 /* separate, because pg_attribute_printf(2, 3) can't appear in definition */
-static inline LLVMBasicBlockRef l_bb_append_v(LLVMValueRef f, const char *fmt,...) pg_attribute_printf(2, 3);
+static inline LLVMBasicBlockRef l_bb_append_v(LLVMValueRef f, const char *fmt, ...) pg_attribute_printf(2, 3);
 
 /*
  * Insert a new basic block after previous basic blocks, the name being
  * determined by fmt and arguments.
  */
 static inline LLVMBasicBlockRef
-l_bb_append_v(LLVMValueRef f, const char *fmt,...)
+l_bb_append_v(LLVMValueRef f, const char *fmt, ...)
 {
 	char		buf[512];
 	va_list		args;
diff --git a/src/include/lib/stringinfo.h b/src/include/lib/stringinfo.h
index 079652c8ce4..e3f4b922300 100644
--- a/src/include/lib/stringinfo.h
+++ b/src/include/lib/stringinfo.h
@@ -196,7 +196,7 @@ extern void resetStringInfo(StringInfo str);
  * to str if necessary.  This is sort of like a combination of sprintf and
  * strcat.
  */
-extern void appendStringInfo(StringInfo str, const char *fmt,...) pg_attribute_printf(2, 3);
+extern void appendStringInfo(StringInfo str, const char *fmt, ...) pg_attribute_printf(2, 3);
 
 /*------------------------
  * appendStringInfoVA
diff --git a/src/include/port.h b/src/include/port.h
index 51df9b80e7d..11dc17619c5 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -231,13 +231,13 @@ pg_ascii_tolower(unsigned char ch)
 #endif
 
 extern int	pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args) pg_attribute_printf(3, 0);
-extern int	pg_snprintf(char *str, size_t count, const char *fmt,...) pg_attribute_printf(3, 4);
+extern int	pg_snprintf(char *str, size_t count, const char *fmt, ...) pg_attribute_printf(3, 4);
 extern int	pg_vsprintf(char *str, const char *fmt, va_list args) pg_attribute_printf(2, 0);
-extern int	pg_sprintf(char *str, const char *fmt,...) pg_attribute_printf(2, 3);
+extern int	pg_sprintf(char *str, const char *fmt, ...) pg_attribute_printf(2, 3);
 extern int	pg_vfprintf(FILE *stream, const char *fmt, va_list args) pg_attribute_printf(2, 0);
-extern int	pg_fprintf(FILE *stream, const char *fmt,...) pg_attribute_printf(2, 3);
+extern int	pg_fprintf(FILE *stream, const char *fmt, ...) pg_attribute_printf(2, 3);
 extern int	pg_vprintf(const char *fmt, va_list args) pg_attribute_printf(1, 0);
-extern int	pg_printf(const char *fmt,...) pg_attribute_printf(1, 2);
+extern int	pg_printf(const char *fmt, ...) pg_attribute_printf(1, 2);
 
 #ifndef WIN32
 /*
@@ -360,7 +360,7 @@ extern bool rmtree(const char *path, bool rmtopdir);
  * passing of other special options.
  */
 extern HANDLE pgwin32_open_handle(const char *, int, bool);
-extern int	pgwin32_open(const char *, int,...);
+extern int	pgwin32_open(const char *, int, ...);
 extern FILE *pgwin32_fopen(const char *, const char *);
 #define		open(a,b,c) pgwin32_open(a,b,c)
 #define		fopen(a,b) pgwin32_fopen(a,b)
diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h
index a12b379e09a..c5981315252 100644
--- a/src/include/utils/elog.h
+++ b/src/include/utils/elog.h
@@ -177,29 +177,29 @@ extern int	errcode(int sqlerrcode);
 extern int	errcode_for_file_access(void);
 extern int	errcode_for_socket_access(void);
 
-extern int	errmsg(const char *fmt,...) pg_attribute_printf(1, 2);
-extern int	errmsg_internal(const char *fmt,...) pg_attribute_printf(1, 2);
+extern int	errmsg(const char *fmt, ...) pg_attribute_printf(1, 2);
+extern int	errmsg_internal(const char *fmt, ...) pg_attribute_printf(1, 2);
 
 extern int	errmsg_plural(const char *fmt_singular, const char *fmt_plural,
-						  unsigned long n,...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
+						  unsigned long n, ...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
 
-extern int	errdetail(const char *fmt,...) pg_attribute_printf(1, 2);
-extern int	errdetail_internal(const char *fmt,...) pg_attribute_printf(1, 2);
+extern int	errdetail(const char *fmt, ...) pg_attribute_printf(1, 2);
+extern int	errdetail_internal(const char *fmt, ...) pg_attribute_printf(1, 2);
 
-extern int	errdetail_log(const char *fmt,...) pg_attribute_printf(1, 2);
+extern int	errdetail_log(const char *fmt, ...) pg_attribute_printf(1, 2);
 
 extern int	errdetail_log_plural(const char *fmt_singular,
 								 const char *fmt_plural,
-								 unsigned long n,...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
+								 unsigned long n, ...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
 
 extern int	errdetail_plural(const char *fmt_singular, const char *fmt_plural,
-							 unsigned long n,...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
+							 unsigned long n, ...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
 
-extern int	errhint(const char *fmt,...) pg_attribute_printf(1, 2);
-extern int	errhint_internal(const char *fmt,...) pg_attribute_printf(1, 2);
+extern int	errhint(const char *fmt, ...) pg_attribute_printf(1, 2);
+extern int	errhint_internal(const char *fmt, ...) pg_attribute_printf(1, 2);
 
 extern int	errhint_plural(const char *fmt_singular, const char *fmt_plural,
-						   unsigned long n,...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
+						   unsigned long n, ...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
 
 /*
  * errcontext() is typically called in error context callback functions, not
@@ -213,7 +213,7 @@ extern int	errhint_plural(const char *fmt_singular, const char *fmt_plural,
 
 extern int	set_errcontext_domain(const char *domain);
 
-extern int	errcontext_msg(const char *fmt,...) pg_attribute_printf(1, 2);
+extern int	errcontext_msg(const char *fmt, ...) pg_attribute_printf(1, 2);
 
 extern int	errhidestmt(bool hide_stmt);
 extern int	errhidecontext(bool hide_ctx);
@@ -301,7 +301,7 @@ extern void errsave_finish(struct Node *context,
 /* Support for constructing error strings separately from ereport() calls */
 
 extern void pre_format_elog_string(int errnumber, const char *domain);
-extern char *format_elog_string(const char *fmt,...) pg_attribute_printf(1, 2);
+extern char *format_elog_string(const char *fmt, ...) pg_attribute_printf(1, 2);

 /* Support for attaching context information to error reports */
@@ -527,7 +527,7 @@ extern void write_jsonlog(ErrorData *edata);
  * not available). Used before ereport/elog can be used
  * safely (memory context, GUC load etc)
  */
-extern void write_stderr(const char *fmt,...) pg_attribute_printf(1, 2);
+extern void write_stderr(const char *fmt, ...) pg_attribute_printf(1, 2);
 extern void vwrite_stderr(const char *fmt, va_list ap) pg_attribute_printf(1, 0);
 
 #endif							/* ELOG_H */
diff --git a/src/include/utils/palloc.h b/src/include/utils/palloc.h
index ac53f189a4e..9295211d200 100644
--- a/src/include/utils/palloc.h
+++ b/src/include/utils/palloc.h
@@ -147,7 +147,7 @@ extern char *pnstrdup(const char *in, Size len);
 extern char *pchomp(const char *in);
 
 /* sprintf into a palloc'd buffer --- these are in psprintf.c */
-extern char *psprintf(const char *fmt,...) pg_attribute_printf(1, 2);
+extern char *psprintf(const char *fmt, ...) pg_attribute_printf(1, 2);
 extern size_t pvsnprintf(char *buf, size_t len, const char *fmt, va_list args) pg_attribute_printf(3, 0);
 
 #endif							/* PALLOC_H */
diff --git a/src/interfaces/ecpg/ecpglib/descriptor.c b/src/interfaces/ecpg/ecpglib/descriptor.c
index 39cd5130ec9..8793d09eb70 100644
--- a/src/interfaces/ecpg/ecpglib/descriptor.c
+++ b/src/interfaces/ecpg/ecpglib/descriptor.c
@@ -231,7 +231,7 @@ get_char_item(int lineno, void *var, enum ECPGttype vartype, char *value, int va
 				}
 
 bool
-ECPGget_desc(int lineno, const char *desc_name, int index,...)
+ECPGget_desc(int lineno, const char *desc_name, int index, ...)
 {
 	va_list		args;
 	PGresult   *ECPGresult;
@@ -610,7 +610,7 @@ set_desc_attr(struct descriptor_item *desc_item, struct variable *var,

 bool
-ECPGset_desc(int lineno, const char *desc_name, int index,...)
+ECPGset_desc(int lineno, const char *desc_name, int index, ...)
 {
 	va_list		args;
 	struct descriptor *desc;
@@ -852,7 +852,7 @@ ecpg_find_desc(int line, const char *name)
 }
 
 bool
-ECPGdescribe(int line, int compat, bool input, const char *connection_name, const char *stmt_name,...)
+ECPGdescribe(int line, int compat, bool input, const char *connection_name, const char *stmt_name, ...)
 {
 	bool		ret = false;
 	struct connection *con;
diff --git a/src/interfaces/ecpg/ecpglib/ecpglib_extern.h b/src/interfaces/ecpg/ecpglib/ecpglib_extern.h
index 949ff66cefc..ec6d1246e78 100644
--- a/src/interfaces/ecpg/ecpglib/ecpglib_extern.h
+++ b/src/interfaces/ecpg/ecpglib/ecpglib_extern.h
@@ -214,7 +214,7 @@ void		ecpg_raise(int line, int code, const char *sqlstate, const char *str);
 void		ecpg_raise_backend(int line, PGresult *result, PGconn *conn, int compat);
 char	   *ecpg_prepared(const char *name, struct connection *con);
 bool		ecpg_deallocate_all_conn(int lineno, enum COMPAT_MODE c, struct connection *con);
-void		ecpg_log(const char *format,...) pg_attribute_printf(1, 2);
+void		ecpg_log(const char *format, ...) pg_attribute_printf(1, 2);
 bool		ecpg_auto_prepare(int lineno, const char *connection_name,
 							  const int compat, char **name, const char *query);
 bool		ecpg_register_prepared_stmt(struct statement *stmt);
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index bd10fef5748..ac665d9d900 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -2288,7 +2288,7 @@ fail:
  * The input/output parameters are passed as variable-length argument list.
  */
 bool
-ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...)
+ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query, ...)
 {
 	va_list		args;
 	bool		ret;
diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c
index 1885732a652..e37168744e4 100644
--- a/src/interfaces/ecpg/ecpglib/misc.c
+++ b/src/interfaces/ecpg/ecpglib/misc.c
@@ -229,7 +229,7 @@ ECPGdebug(int n, FILE *dbgs)
 }
 
 void
-ecpg_log(const char *format,...)
+ecpg_log(const char *format, ...)
 {
 	va_list		ap;
 	const char *intl_format;
diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h
index dbf3cc3a0c2..1d971d5893d 100644
--- a/src/interfaces/ecpg/include/ecpglib.h
+++ b/src/interfaces/ecpg/include/ecpglib.h
@@ -29,7 +29,7 @@ bool		ECPGconnect(int lineno, int c, const char *name, const char *user,
 						const char *passwd, const char *connection_name, int autocommit);
 bool		ECPGdo(const int lineno, const int compat, const int force_indicator,
 				   const char *connection_name, const bool questionmarks,
-				   const int st, const char *query,...);
+				   const int st, const char *query, ...);
 bool		ECPGtrans(int lineno, const char *connection_name, const char *transaction);
 bool		ECPGdisconnect(int lineno, const char *connection_name);
 bool		ECPGprepare(int lineno, const char *connection_name, const bool questionmarks,
@@ -55,14 +55,14 @@ bool		ECPGdo_descriptor(int line, const char *connection,
 bool		ECPGdeallocate_desc(int line, const char *name);
 bool		ECPGallocate_desc(int line, const char *name);
 bool		ECPGget_desc_header(int lineno, const char *desc_name, int *count);
-bool		ECPGget_desc(int lineno, const char *desc_name, int index,...);
+bool		ECPGget_desc(int lineno, const char *desc_name, int index, ...);
 bool		ECPGset_desc_header(int lineno, const char *desc_name, int count);
-bool		ECPGset_desc(int lineno, const char *desc_name, int index,...);
+bool		ECPGset_desc(int lineno, const char *desc_name, int index, ...);
 
 void		ECPGset_noind_null(enum ECPGttype type, void *ptr);
 bool		ECPGis_noind_null(enum ECPGttype type, const void *ptr);
 bool		ECPGdescribe(int line, int compat, bool input,
-						 const char *connection_name, const char *stmt_name,...);
+						 const char *connection_name, const char *stmt_name, ...);
 
 void		ECPGset_var(int number, void *pointer, int lineno);
 void	   *ECPGget_var(int number);
diff --git a/src/interfaces/ecpg/preproc/preproc_extern.h b/src/interfaces/ecpg/preproc/preproc_extern.h
index 2c89e30621e..c61f054873b 100644
--- a/src/interfaces/ecpg/preproc/preproc_extern.h
+++ b/src/interfaces/ecpg/preproc/preproc_extern.h
@@ -85,11 +85,11 @@ extern void *loc_alloc(size_t size);
 extern char *loc_strdup(const char *string);
 extern void reclaim_local_storage(void);
 extern char *cat2_str(const char *str1, const char *str2);
-extern char *cat_str(int count,...);
+extern char *cat_str(int count, ...);
 extern char *make2_str(const char *str1, const char *str2);
 extern char *make3_str(const char *str1, const char *str2, const char *str3);
-extern void mmerror(int error_code, enum errortype type, const char *error,...) pg_attribute_printf(3, 4);
-pg_noreturn extern void mmfatal(int error_code, const char *error,...) pg_attribute_printf(2, 3);
+extern void mmerror(int error_code, enum errortype type, const char *error, ...) pg_attribute_printf(3, 4);
+pg_noreturn extern void mmfatal(int error_code, const char *error, ...) pg_attribute_printf(2, 3);
 extern void output_get_descr_header(const char *desc_name);
 extern void output_get_descr(const char *desc_name, const char *index);
 extern void output_set_descr_header(const char *desc_name);
diff --git a/src/interfaces/ecpg/preproc/util.c b/src/interfaces/ecpg/preproc/util.c
index f177df32488..ba1f049a87d 100644
--- a/src/interfaces/ecpg/preproc/util.c
+++ b/src/interfaces/ecpg/preproc/util.c
@@ -47,7 +47,7 @@ vmmerror(int error_code, enum errortype type, const char *error, va_list ap)
 
 /* Report an error or warning */
 void
-mmerror(int error_code, enum errortype type, const char *error,...)
+mmerror(int error_code, enum errortype type, const char *error, ...)
 {
 	va_list		ap;
 
@@ -58,7 +58,7 @@ mmerror(int error_code, enum errortype type, const char *error,...)
 
 /* Report an error and abandon execution */
 void
-mmfatal(int error_code, const char *error,...)
+mmfatal(int error_code, const char *error, ...)
 {
 	va_list		ap;
 
@@ -217,7 +217,7 @@ cat2_str(const char *str1, const char *str2)
  * Concatenate N strings, inserting spaces between them unless they are empty
  */
 char *
-cat_str(int count,...)
+cat_str(int count, ...)
 {
 	va_list		args;
 	int			i;
diff --git a/src/interfaces/libpq-oauth/oauth-utils.c b/src/interfaces/libpq-oauth/oauth-utils.c
index 4ebe7d0948c..f9a2c1ae20d 100644
--- a/src/interfaces/libpq-oauth/oauth-utils.c
+++ b/src/interfaces/libpq-oauth/oauth-utils.c
@@ -92,7 +92,7 @@ libpq_oauth_init(pgthreadlock_t threadlock_impl,
  * connection, after translating it.  This is a copy of libpq's internal API.
  */
 void
-libpq_append_conn_error(PGconn *conn, const char *fmt,...)
+libpq_append_conn_error(PGconn *conn, const char *fmt, ...)
 {
 	int			save_errno = errno;
 	bool		done;
diff --git a/src/interfaces/libpq-oauth/oauth-utils.h b/src/interfaces/libpq-oauth/oauth-utils.h
index 9f4d5b692d2..ef19d006807 100644
--- a/src/interfaces/libpq-oauth/oauth-utils.h
+++ b/src/interfaces/libpq-oauth/oauth-utils.h
@@ -75,7 +75,7 @@ typedef enum
 	PG_BOOL_NO					/* No (false) */
 } PGTernaryBool;
 
-extern void libpq_append_conn_error(PGconn *conn, const char *fmt,...) pg_attribute_printf(2, 3);
+extern void libpq_append_conn_error(PGconn *conn, const char *fmt, ...) pg_attribute_printf(2, 3);
 extern bool oauth_unsafe_debugging_enabled(void);
 extern int	pq_block_sigpipe(sigset_t *osigset, bool *sigpipe_pending);
 extern void pq_reset_sigpipe(sigset_t *osigset, bool sigpipe_pending, bool got_epipe);
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index 203d388bdbf..8c610d170a6 100644
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -941,7 +941,7 @@ pqPrepareAsyncResult(PGconn *conn)
  * a trailing newline, and should not be more than one line).
  */
 void
-pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt,...)
+pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt, ...)
 {
 	char		msgBuf[1024];
 	va_list		args;
diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c
index 5e54353fbfe..52b6428c5c0 100644
--- a/src/interfaces/libpq/fe-misc.c
+++ b/src/interfaces/libpq/fe-misc.c
@@ -1372,7 +1372,7 @@ libpq_ngettext(const char *msgid, const char *msgid_plural, unsigned long n)
  * newline.
  */
 void
-libpq_append_error(PQExpBuffer errorMessage, const char *fmt,...)
+libpq_append_error(PQExpBuffer errorMessage, const char *fmt, ...)
 {
 	int			save_errno = errno;
 	bool		done;
@@ -1401,7 +1401,7 @@ libpq_append_error(PQExpBuffer errorMessage, const char *fmt,...)
  * format should not end with a newline.
  */
 void
-libpq_append_conn_error(PGconn *conn, const char *fmt,...)
+libpq_append_conn_error(PGconn *conn, const char *fmt, ...)
 {
 	int			save_errno = errno;
 	bool		done;
diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq-int.h
index fb6a7cbf15d..c0bb70a65a3 100644
--- a/src/interfaces/libpq/libpq-int.h
+++ b/src/interfaces/libpq/libpq-int.h
@@ -752,7 +752,7 @@ extern char *pqResultStrdup(PGresult *res, const char *str);
 extern void pqClearAsyncResult(PGconn *conn);
 extern void pqSaveErrorResult(PGconn *conn);
 extern PGresult *pqPrepareAsyncResult(PGconn *conn);
-extern void pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt,...) pg_attribute_printf(2, 3);
+extern void pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt, ...) pg_attribute_printf(2, 3);
 extern void pqSaveMessageField(PGresult *res, char code,
 							   const char *value);
 extern int	pqSaveParameterStatus(PGconn *conn, const char *name,
@@ -956,8 +956,8 @@ extern char *libpq_ngettext(const char *msgid, const char *msgid_plural, unsigne
  */
 #undef _
 
-extern void libpq_append_error(PQExpBuffer errorMessage, const char *fmt,...) pg_attribute_printf(2, 3);
-extern void libpq_append_conn_error(PGconn *conn, const char *fmt,...) pg_attribute_printf(2, 3);
+extern void libpq_append_error(PQExpBuffer errorMessage, const char *fmt, ...) pg_attribute_printf(2, 3);
+extern void libpq_append_conn_error(PGconn *conn, const char *fmt, ...) pg_attribute_printf(2, 3);
 
 /*
  * These macros are needed to let error-handling code be portable between
diff --git a/src/interfaces/libpq/pqexpbuffer.c b/src/interfaces/libpq/pqexpbuffer.c
index 153ae6af6cb..7563993f6d6 100644
--- a/src/interfaces/libpq/pqexpbuffer.c
+++ b/src/interfaces/libpq/pqexpbuffer.c
@@ -232,7 +232,7 @@ enlargePQExpBuffer(PQExpBuffer str, size_t needed)
  * resetPQExpBuffer() followed by appendPQExpBuffer().
  */
 void
-printfPQExpBuffer(PQExpBuffer str, const char *fmt,...)
+printfPQExpBuffer(PQExpBuffer str, const char *fmt, ...)
 {
 	int			save_errno = errno;
 	va_list		args;
@@ -262,7 +262,7 @@ printfPQExpBuffer(PQExpBuffer str, const char *fmt,...)
  * strcat.
  */
 void
-appendPQExpBuffer(PQExpBuffer str, const char *fmt,...)
+appendPQExpBuffer(PQExpBuffer str, const char *fmt, ...)
 {
 	int			save_errno = errno;
 	va_list		args;
diff --git a/src/interfaces/libpq/pqexpbuffer.h b/src/interfaces/libpq/pqexpbuffer.h
index dc83f4ffe86..2741bb9e2ff 100644
--- a/src/interfaces/libpq/pqexpbuffer.h
+++ b/src/interfaces/libpq/pqexpbuffer.h
@@ -146,7 +146,7 @@ extern int	enlargePQExpBuffer(PQExpBuffer str, size_t needed);
  * This is a convenience routine that does the same thing as
  * resetPQExpBuffer() followed by appendPQExpBuffer().
  */
-extern void printfPQExpBuffer(PQExpBuffer str, const char *fmt,...) pg_attribute_printf(2, 3);
+extern void printfPQExpBuffer(PQExpBuffer str, const char *fmt, ...) pg_attribute_printf(2, 3);
 
 /*------------------------
  * appendPQExpBuffer
@@ -155,7 +155,7 @@ extern void printfPQExpBuffer(PQExpBuffer str, const char *fmt,...) pg_attribute
  * to str if necessary.  This is sort of like a combination of sprintf and
  * strcat.
  */
-extern void appendPQExpBuffer(PQExpBuffer str, const char *fmt,...) pg_attribute_printf(2, 3);
+extern void appendPQExpBuffer(PQExpBuffer str, const char *fmt, ...) pg_attribute_printf(2, 3);
 
 /*------------------------
  * appendPQExpBufferVA
diff --git a/src/pl/plpython/plpy_elog.c b/src/pl/plpython/plpy_elog.c
index e109888cced..a64620559b4 100644
--- a/src/pl/plpython/plpy_elog.c
+++ b/src/pl/plpython/plpy_elog.c
@@ -41,7 +41,7 @@ static bool set_string_attr(PyObject *obj, char *attrname, char *str);
  * in the context.
  */
 void
-PLy_elog_impl(int elevel, const char *fmt,...)
+PLy_elog_impl(int elevel, const char *fmt, ...)
 {
 	int			save_errno = errno;
 	char	   *volatile xmsg = NULL;
@@ -487,7 +487,7 @@ get_source_line(const char *src, int lineno)
 
 /* call PyErr_SetString with a vprint interface and translation support */
 void
-PLy_exception_set(PyObject *exc, const char *fmt,...)
+PLy_exception_set(PyObject *exc, const char *fmt, ...)
 {
 	char		buf[1024];
 	va_list		ap;
@@ -503,7 +503,7 @@ PLy_exception_set(PyObject *exc, const char *fmt,...)
 void
 PLy_exception_set_plural(PyObject *exc,
 						 const char *fmt_singular, const char *fmt_plural,
-						 unsigned long n,...)
+						 unsigned long n, ...)
 {
 	char		buf[1024];
 	va_list		ap;
diff --git a/src/pl/plpython/plpy_elog.h b/src/pl/plpython/plpy_elog.h
index dc65f2f6ee2..3150f9e72ca 100644
--- a/src/pl/plpython/plpy_elog.h
+++ b/src/pl/plpython/plpy_elog.h
@@ -34,12 +34,12 @@ extern PyObject *PLy_exc_spi_error;
 	} while(0)
 #endif							/* HAVE__BUILTIN_CONSTANT_P */
 
-extern PGDLLEXPORT void PLy_elog_impl(int elevel, const char *fmt,...) pg_attribute_printf(2, 3);
+extern PGDLLEXPORT void PLy_elog_impl(int elevel, const char *fmt, ...) pg_attribute_printf(2, 3);
 
-extern PGDLLEXPORT void PLy_exception_set(PyObject *exc, const char *fmt,...) pg_attribute_printf(2, 3);
+extern PGDLLEXPORT void PLy_exception_set(PyObject *exc, const char *fmt, ...) pg_attribute_printf(2, 3);
 
 extern PGDLLEXPORT void PLy_exception_set_plural(PyObject *exc, const char *fmt_singular, const char *fmt_plural,
-												 unsigned long n,...) pg_attribute_printf(2, 5) pg_attribute_printf(3, 5);
+												 unsigned long n, ...) pg_attribute_printf(2, 5) pg_attribute_printf(3, 5);
 
 extern PGDLLEXPORT void PLy_exception_set_with_details(PyObject *excclass, ErrorData *edata);
 
diff --git a/src/port/open.c b/src/port/open.c
index 2cd26060aa3..4be08b2cf13 100644
--- a/src/port/open.c
+++ b/src/port/open.c
@@ -165,7 +165,7 @@ pgwin32_open_handle(const char *fileName, int fileFlags, bool backup_semantics)
 }
 
 int
-pgwin32_open(const char *fileName, int fileFlags,...)
+pgwin32_open(const char *fileName, int fileFlags, ...)
 {
 	HANDLE		h;
 	int			fd;
diff --git a/src/port/snprintf.c b/src/port/snprintf.c
index 56c7036753c..b19a45c81e4 100644
--- a/src/port/snprintf.c
+++ b/src/port/snprintf.c
@@ -199,7 +199,7 @@ pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args)
 }
 
 int
-pg_snprintf(char *str, size_t count, const char *fmt,...)
+pg_snprintf(char *str, size_t count, const char *fmt, ...)
 {
 	int			len;
 	va_list		args;
@@ -227,7 +227,7 @@ pg_vsprintf(char *str, const char *fmt, va_list args)
 }
 
 int
-pg_sprintf(char *str, const char *fmt,...)
+pg_sprintf(char *str, const char *fmt, ...)
 {
 	int			len;
 	va_list		args;
@@ -261,7 +261,7 @@ pg_vfprintf(FILE *stream, const char *fmt, va_list args)
 }
 
 int
-pg_fprintf(FILE *stream, const char *fmt,...)
+pg_fprintf(FILE *stream, const char *fmt, ...)
 {
 	int			len;
 	va_list		args;
@@ -279,7 +279,7 @@ pg_vprintf(const char *fmt, va_list args)
 }
 
 int
-pg_printf(const char *fmt,...)
+pg_printf(const char *fmt, ...)
 {
 	int			len;
 	va_list		args;
diff --git a/src/port/win32security.c b/src/port/win32security.c
index 46d2fc774b4..d3ca70f0eac 100644
--- a/src/port/win32security.c
+++ b/src/port/win32security.c
@@ -17,7 +17,7 @@
 #include "postgres_fe.h"
 #endif
 
-static void log_error(const char *fmt,...) pg_attribute_printf(1, 2);
+static void log_error(const char *fmt, ...) pg_attribute_printf(1, 2);

 /*
@@ -25,7 +25,7 @@ static void log_error(const char *fmt,...) pg_attribute_printf(1, 2);
  * message.
  */
 static void
-log_error(const char *fmt,...)
+log_error(const char *fmt, ...)
 {
 	va_list		ap;
 
diff --git a/src/test/modules/libpq_pipeline/libpq_pipeline.c b/src/test/modules/libpq_pipeline/libpq_pipeline.c
index ce1a9995f46..9cf249a86f4 100644
--- a/src/test/modules/libpq_pipeline/libpq_pipeline.c
+++ b/src/test/modules/libpq_pipeline/libpq_pipeline.c
@@ -24,7 +24,7 @@

 static void exit_nicely(PGconn *conn);
-pg_noreturn static void pg_fatal_impl(int line, const char *fmt,...)
+pg_noreturn static void pg_fatal_impl(int line, const char *fmt, ...)
 			pg_attribute_printf(2, 3);
 static bool process_result(PGconn *conn, PGresult *res, int results,
 						   int numsent);
@@ -72,7 +72,7 @@ exit_nicely(PGconn *conn)
  */
 #define pg_fatal(...) pg_fatal_impl(__LINE__, __VA_ARGS__)
 pg_noreturn static void
-pg_fatal_impl(int line, const char *fmt,...)
+pg_fatal_impl(int line, const char *fmt, ...)
 {
 	va_list		args;
 
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index b5c0cb647a8..6dc7d16aa87 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -146,12 +146,12 @@ static void make_directory(const char *dir);
 static void test_status_print(bool ok, const char *testname, double runtime, bool parallel);
 static void test_status_ok(const char *testname, double runtime, bool parallel);
 static void test_status_failed(const char *testname, double runtime, bool parallel);
-static void bail_out(bool noatexit, const char *fmt,...) pg_attribute_printf(2, 3);
-static void emit_tap_output(TAPtype type, const char *fmt,...) pg_attribute_printf(2, 3);
+static void bail_out(bool noatexit, const char *fmt, ...) pg_attribute_printf(2, 3);
+static void emit_tap_output(TAPtype type, const char *fmt, ...) pg_attribute_printf(2, 3);
 static void emit_tap_output_v(TAPtype type, const char *fmt, va_list argp) pg_attribute_printf(2, 0);
 
 static StringInfo psql_start_command(void);
-static void psql_add_command(StringInfo buf, const char *query,...) pg_attribute_printf(2, 3);
+static void psql_add_command(StringInfo buf, const char *query, ...) pg_attribute_printf(2, 3);
 static void psql_end_command(StringInfo buf, const char *database);
 
 /*
@@ -252,7 +252,7 @@ split_to_stringlist(const char *s, const char *delim, _stringlist **listhead)
  * exit handlers, thus avoid any risk of bottomless recursion calls to exit.
  */
 static void
-bail_out(bool noatexit, const char *fmt,...)
+bail_out(bool noatexit, const char *fmt, ...)
 {
 	va_list		ap;
 
@@ -328,7 +328,7 @@ test_status_failed(const char *testname, double runtime, bool parallel)

 static void
-emit_tap_output(TAPtype type, const char *fmt,...)
+emit_tap_output(TAPtype type, const char *fmt, ...)
 {
 	va_list		argp;
 
@@ -1129,7 +1129,7 @@ psql_start_command(void)
 }
 
 static void
-psql_add_command(StringInfo buf, const char *query,...)
+psql_add_command(StringInfo buf, const char *query, ...)
 {
 	StringInfoData cmdbuf;
 	const char *cmdptr;
diff --git a/src/timezone/zic.c b/src/timezone/zic.c
index 8dcc7b337a7..9723effa85b 100644
--- a/src/timezone/zic.c
+++ b/src/timezone/zic.c
@@ -123,8 +123,8 @@ extern int	link(const char *target, const char *linkname);
 #endif
 
 static void verror(const char *const string, va_list args) pg_attribute_printf(1, 0);
-static void error(const char *const string,...) pg_attribute_printf(1, 2);
-static void warning(const char *const string,...) pg_attribute_printf(1, 2);
+static void error(const char *const string, ...) pg_attribute_printf(1, 2);
+static void warning(const char *const string, ...) pg_attribute_printf(1, 2);
 static void addtt(zic_t starttime, int type);
 static int	addtype(zic_t utoff, char const *abbr,
 					bool isdst, bool ttisstd, bool ttisut);
@@ -515,7 +515,7 @@ verror(const char *const string, va_list args)
 }
 
 static void
-error(const char *const string,...)
+error(const char *const string, ...)
 {
 	va_list		args;
 
@@ -526,7 +526,7 @@ error(const char *const string,...)
 }
 
 static void
-warning(const char *const string,...)
+warning(const char *const string, ...)
 {
 	va_list		args;
 
-- 
2.47.3

---

From: Andreas Karlsson <[email-masked]>
Date: Mon, 2 Mar 2026 23:41:54 +0100

Here is a rebased version of the patch.

Andreas
From 2e78d6b114c7276e4560edae72bfdc56830b0749 Mon Sep 17 00:00:00 2001
From: Andreas Karlsson <[email-masked]>
Date: Tue, 17 Feb 2026 09:04:01 +0100
Subject: [PATCH v2 1/2] Make pgindent add a space between comma and period

diff --git a/src/tools/pg_bsd_indent/indent.c b/src/tools/pg_bsd_indent/indent.c
index 421592db928..58fa04293d9 100644
--- a/src/tools/pg_bsd_indent/indent.c
+++ b/src/tools/pg_bsd_indent/indent.c
@@ -1013,6 +1013,8 @@ check_type:

From 7e84ed721276840968768ac1503a736a7f53a4a1 Mon Sep 17 00:00:00 2001
From: Andreas Karlsson <[email-masked]>
Date: Tue, 17 Feb 2026 09:07:31 +0100
Subject: [PATCH v2 2/2] Run pgindent add a space between comma and period

---

 
 /*
 
 void

 #ifdef PX_DEBUG

 

diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index 80b78f25267..7c921630b1c 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -1090,7 +1090,7 @@ errcode_for_socket_access(void)
  * ereport will provide one for the output methods that need it.
  */
 int
-errmsg(const char *fmt,...)
+errmsg(const char *fmt, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1345,7 +1345,7 @@ backtrace_cleanup(int code, Datum arg)
  * error recursion.
  */
 int
-errmsg_internal(const char *fmt,...)
+errmsg_internal(const char *fmt, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1369,7 +1369,7 @@ errmsg_internal(const char *fmt,...)
  */
 int
 errmsg_plural(const char *fmt_singular, const char *fmt_plural,
-			  unsigned long n,...)
+			  unsigned long n, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1391,7 +1391,7 @@ errmsg_plural(const char *fmt_singular, const char *fmt_plural,
  * errdetail --- add a detail error message text to the current error
  */
 int
-errdetail(const char *fmt,...)
+errdetail(const char *fmt, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1418,7 +1418,7 @@ errdetail(const char *fmt,...)
  * (typically, that they don't seem to be useful to average users).
  */
 int
-errdetail_internal(const char *fmt,...)
+errdetail_internal(const char *fmt, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1439,7 +1439,7 @@ errdetail_internal(const char *fmt,...)
  * errdetail_log --- add a detail_log error message text to the current error
  */
 int
-errdetail_log(const char *fmt,...)
+errdetail_log(const char *fmt, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1461,7 +1461,7 @@ errdetail_log(const char *fmt,...)
  */
 int
 errdetail_log_plural(const char *fmt_singular, const char *fmt_plural,
-					 unsigned long n,...)
+					 unsigned long n, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1484,7 +1484,7 @@ errdetail_log_plural(const char *fmt_singular, const char *fmt_plural,
  */
 int
 errdetail_plural(const char *fmt_singular, const char *fmt_plural,
-				 unsigned long n,...)
+				 unsigned long n, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1505,7 +1505,7 @@ errdetail_plural(const char *fmt_singular, const char *fmt_plural,
  * errhint --- add a hint error message text to the current error
  */
 int
-errhint(const char *fmt,...)
+errhint(const char *fmt, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1527,7 +1527,7 @@ errhint(const char *fmt,...)
  * Non-translated version of errhint(), see also errmsg_internal().
  */
 int
-errhint_internal(const char *fmt,...)
+errhint_internal(const char *fmt, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1549,7 +1549,7 @@ errhint_internal(const char *fmt,...)
  */
 int
 errhint_plural(const char *fmt_singular, const char *fmt_plural,
-			   unsigned long n,...)
+			   unsigned long n, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1574,7 +1574,7 @@ errhint_plural(const char *fmt_singular, const char *fmt_plural,
  * states.
  */
 int
-errcontext_msg(const char *fmt,...)
+errcontext_msg(const char *fmt, ...)
 {
 	ErrorData  *edata = &errordata[errordata_stack_depth];
 	MemoryContext oldcontext;
@@ -1846,7 +1846,7 @@ pre_format_elog_string(int errnumber, const char *domain)
 }
 
 char *
@@ -4222,7 +4222,7 @@ append_with_tabs(StringInfo buf, const char *str)

 
 /*
  * appendJSONKeyValue
index d77502838c4..f3b24f1e602 100644
index 2e50b7af4d2..021fd3ffa1d 100644
 
 /*
 
index 3cc61455dcb..3f0645e1048 100644

 void
index fda912ba0a9..28e7ff6fa16 100644

 #define appendStringLiteralAH(buf,str,AH) \
 	appendStringLiteral(buf, str, (AH)->encoding, (AH)->std_strings)
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index df8a69d3b79..c15be27978f 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -1673,7 +1673,7 @@ archputs(const char *s, Archive *AH)
 
 /* Public */
 int
-archprintf(Archive *AH, const char *fmt,...)
+archprintf(Archive *AH, const char *fmt, ...)
 {
 	int			save_errno = errno;
 	char	   *p;
@@ -1777,7 +1777,7 @@ RestoreOutput(ArchiveHandle *AH, CompressFileHandle *savedOutput)
  *	Print formatted text to the output file (usually stdout).
  */
 int
-ahprintf(ArchiveHandle *AH, const char *fmt,...)
+ahprintf(ArchiveHandle *AH, const char *fmt, ...)
 {
 	int			save_errno = errno;
 	char	   *p;
@@ -1915,7 +1915,7 @@ ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH)

diff --git a/src/bin/pg_dump/pg_backup_archiver.h b/src/bin/pg_dump/pg_backup_archiver.h
index 365073b3eae..bff9ab2d9ab 100644
--- a/src/bin/pg_dump/pg_backup_archiver.h
+++ b/src/bin/pg_dump/pg_backup_archiver.h
@@ -396,7 +396,7 @@ extern int	parallel_restore(ArchiveHandle *AH, TocEntry *te);
 extern void on_exit_close_archive(Archive *AHX);
 extern void replace_on_exit_close_archive(Archive *AHX);

 /* Options for ArchiveEntry */
 typedef struct _archiveOpts
@@ -474,6 +474,6 @@ extern void IssueACLPerBlob(ArchiveHandle *AH, TocEntry *te);
 extern void DropLOIfExists(ArchiveHandle *AH, Oid oid);

 #endif
index d94d0de2a5d..c8162410adf 100644

 static int
index f0406de84ee..f57dbbbb853 100644
index 1d767bbda2d..330818c8eb0 100644

 

@@ -512,7 +512,7 @@ MultiXactOffset rewrite_multixacts(MultiXactId from_multi, MultiXactId to_multi)
 
 /* parallel.c */
index 1eb8bc97c05..5d81e4e95b8 100644
@@ -121,7 +121,7 @@ cluster_conn_opts(ClusterInfo *cluster)

 void

 void
 
index cbc9447384f..f4c9a111677 100644

 

 
 /*
  * Main program.

 
 static void
 
index 987cce820b9..79c967cf9b0 100644
 
 void

 

 /*

 

 

 /*

 /*

 
 #ifndef WIN32
 /*

 

 

 
 /*

 

 
 #endif							/* ELOG_H */

 #endif							/* PALLOC_H */
 
 bool

 bool
 
 bool
 
 void

 

 
 
index 13775cfb8b9..325a485ef53 100644
index bd7eb59f5f8..94dd1b6f35c 100644
 
 extern void libpq_append_grease_info(PGconn *conn);
 
 /*

 

 

 
 int
index 5deee44d3a2..2189ebfe399 100644
 
 int
 
 int
 
 int
 
 int

 /*
 
diff --git a/src/test/modules/libpq_pipeline/libpq_pipeline.c b/src/test/modules/libpq_pipeline/libpq_pipeline.c
index aa0a6bbe762..ee3e2ec7570 100644
--- a/src/test/modules/libpq_pipeline/libpq_pipeline.c
+++ b/src/test/modules/libpq_pipeline/libpq_pipeline.c
@@ -24,7 +24,7 @@

index b8b6a911987..bcb42fa2119 100644

 /*

 static void

 static void
index 2f36486a350..8a925cbed6b 100644

 static void

 static void
 
-- 
2.47.3

---

From: Andreas Karlsson <[email-masked]>
Date: Tue, 31 Mar 2026 08:30:25 +0200

> Here is a rebased version of the patch.
Rebased it again.

Andreas
From 50f72461e93f1503ba927666e62ec8c49365f936 Mon Sep 17 00:00:00 2001
From: Andreas Karlsson <[email-masked]>
Date: Tue, 17 Feb 2026 09:04:01 +0100
Subject: [PATCH v3 1/2] Make pgindent add a space between comma and period

 

From b9e0d9af484603420129ee401382a453c5d10226 Mon Sep 17 00:00:00 2001
From: Andreas Karlsson <[email-masked]>
Date: Tue, 17 Feb 2026 09:07:31 +0100
Subject: [PATCH v3 2/2] Run pgindent add a space between comma and period

---
 src/bin/pg_basebackup/pg_createsubscriber.c   |  8 +++---
 src/fe_utils/option_utils.c                   |  2 +-
 src/include/fe_utils/option_utils.h           |  2 +-
 70 files changed, 167 insertions(+), 167 deletions(-)

index 134b52085b7..7603c79fe69 100644
@@ -123,7 +123,7 @@ static bool dblink_connstr_has_pw(const char *connstr);
@@ -2792,7 +2792,7 @@ dblink_connstr_check(const char *connstr)

 /*
 
 void

 #ifdef PX_DEBUG
index 8849610db00..3145c58a9b1 100644
@@ -41,7 +41,7 @@
 
@@ -70,7 +70,7 @@ static void WALOpenSegmentInit(WALOpenSegment *seg, WALSegmentContext *segcxt,
 
index 6f3552c6a4a..9235f6b268c 100644
 
@@ -1018,7 +1018,7 @@ manifest_process_wal_range(JsonManifestParseContext *context,
  * manifest.
  */
 static void
-manifest_report_error(JsonManifestParseContext *context, const char *fmt,...)
+manifest_report_error(JsonManifestParseContext *context, const char *fmt, ...)
 {
 	StringInfoData errbuf;

index 314ef85fdb4..b479c6c5287 100644
 
 char *

 
 /*
  * appendJSONKeyValue
@@ -68,7 +68,7 @@ appendJSONKeyValue(StringInfo buf, const char *key, const char *value,
  */
 static void
 appendJSONKeyValueFmt(StringInfo buf, const char *key,
-					  bool escape_key, const char *fmt,...)
+					  bool escape_key, const char *fmt, ...)
 {
 	int			save_errno = errno;
 	size_t		len = 128;		/* initial assumption about buffer size */
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index e1546d9c97a..7a872bfa695 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -261,7 +261,7 @@ static bool valid_custom_variable_name(const char *name);
 static bool assignable_custom_variable_name(const char *name, bool skip_errors,
 											int elevel);
 static void do_serialize(char **destptr, Size *maxbytes,
-						 const char *fmt,...) pg_attribute_printf(3, 4);
+						 const char *fmt, ...) pg_attribute_printf(3, 4);
 static bool call_bool_check_hook(const struct config_generic *conf, bool *newval,
 								 void **extra, GucSource source, int elevel);
 static bool call_int_check_hook(const struct config_generic *conf, int *newval,
@@ -5877,7 +5877,7 @@ EstimateGUCStateSpace(void)
  * maxbytes is not sufficient to copy the string, error out.
  */
 static void
-do_serialize(char **destptr, Size *maxbytes, const char *fmt,...)
+do_serialize(char **destptr, Size *maxbytes, const char *fmt, ...)
 {
 	va_list		vargs;
 	int			n;
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index 37631f700af..bfb655243d6 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -152,12 +152,12 @@ static void drop_existing_subscription(PGconn *conn, const char *subname,
 static void get_publisher_databases(struct CreateSubscriberOptions *opt,
 									bool dbnamespecified);
 static void report_createsub_log(enum pg_log_level, enum pg_log_part,
-								 const char *pg_restrict fmt,...)
+								 const char *pg_restrict fmt, ...)
 			pg_attribute_printf(3, 4);
 static void report_createsub_log_v(enum pg_log_level level, enum pg_log_part part,
 								   const char *pg_restrict fmt, va_list args)
 			pg_attribute_printf(3, 0);
-pg_noreturn static void report_createsub_fatal(const char *pg_restrict fmt,...)
+pg_noreturn static void report_createsub_fatal(const char *pg_restrict fmt, ...)
 			pg_attribute_printf(1, 2);
 static void internal_log_file_write(enum pg_log_level level,
 									enum pg_log_part part,
@@ -224,7 +224,7 @@ report_createsub_log_v(enum pg_log_level level, enum pg_log_part part,
 
 static void
 report_createsub_log(enum pg_log_level level, enum pg_log_part part,
-					 const char *pg_restrict fmt,...)
+					 const char *pg_restrict fmt, ...)
 {
 	va_list		args;
 
@@ -239,7 +239,7 @@ report_createsub_log(enum pg_log_level level, enum pg_log_part part,
  * Report a fatal error and exit
  */
 static void
-report_createsub_fatal(const char *pg_restrict fmt,...)
+report_createsub_fatal(const char *pg_restrict fmt, ...)
 {
 	va_list		args;

 /*

 

 void

index 271a2c3e481..8cb6da38289 100644
 
 /* Public */
 int

 

 
 #endif

 static int

 

 
 /* parallel.c */

 void

 void
 
index b60ab8739d5..bd9883244d7 100644
 
 static void verify_tar_backup(verifier_context *context, DIR *dir,
@@ -521,7 +521,7 @@ parse_manifest_file(char *manifest_path)
  * expects this function not to return.
  */
 static void
-report_manifest_error(JsonManifestParseContext *context, const char *fmt,...)
+report_manifest_error(JsonManifestParseContext *context, const char *fmt, ...)
 {
 	va_list		ap;
 
@@ -1250,7 +1250,7 @@ parse_required_wal(verifier_context *context, char *pg_waldump_path,
  * context says we should.
  */
 void
-report_backup_error(verifier_context *context, const char *pg_restrict fmt,...)
+report_backup_error(verifier_context *context, const char *pg_restrict fmt, ...)
 {
 	va_list		ap;
 
@@ -1267,7 +1267,7 @@ report_backup_error(verifier_context *context, const char *pg_restrict fmt,...)
  * Report a fatal error and exit
  */
 void
-report_fatal_error(const char *pg_restrict fmt,...)
+report_fatal_error(const char *pg_restrict fmt, ...)
 {
 	va_list		ap;

 
 /*
  * Main program.

 
 static void
 
diff --git a/src/bin/psql/tab-complete.in.c b/src/bin/psql/tab-complete.in.c
index 53bf1e21721..34080f6bd14 100644
--- a/src/bin/psql/tab-complete.in.c
+++ b/src/bin/psql/tab-complete.in.c
@@ -1688,7 +1688,7 @@ TailMatchesArray(bool case_sensitive,
 static bool
 TailMatchesImpl(bool case_sensitive,
 				int previous_words_count, char **previous_words,
-				int narg,...)
+				int narg, ...)
 {
 	const char *argarray[64];
 	va_list		args;
@@ -1738,7 +1738,7 @@ HeadMatchesArray(bool case_sensitive,
 static bool
 HeadMatchesImpl(bool case_sensitive,
 				int previous_words_count, char **previous_words,
-				int narg,...)
+				int narg, ...)
 {
 	const char *argarray[64];
 	va_list		args;
@@ -1825,7 +1825,7 @@ MatchesArray(bool case_sensitive,
 static bool
 MatchesImpl(bool case_sensitive,
 			int previous_words_count, char **previous_words,
-			int narg,...)
+			int narg, ...)
 {
 	const char *argarray[64];
 	va_list		args;
diff --git a/src/common/logging.c b/src/common/logging.c
index 5206949e5d8..bfd7e5076bc 100644
--- a/src/common/logging.c
+++ b/src/common/logging.c
@@ -206,7 +206,7 @@ pg_logging_set_locus_callback(void (*cb) (const char **filename, uint64 *lineno)
 
 void

 
diff --git a/src/fe_utils/option_utils.c b/src/fe_utils/option_utils.c
index 8d0659c1164..c8bba075c1f 100644
--- a/src/fe_utils/option_utils.c
+++ b/src/fe_utils/option_utils.c
@@ -122,7 +122,7 @@ parse_sync_method(const char *optarg, DataDirSyncMethod *sync_method)
  * parameter (it discovers the number of arguments automagically).
  */
 void
-check_mut_excl_opts_internal(int n,...)
+check_mut_excl_opts_internal(int n, ...)
 {
 	char	   *first = NULL;
 	va_list		args;
diff --git a/src/include/access/amvalidate.h b/src/include/access/amvalidate.h
index b82998778ac..debd1ed37a4 100644
--- a/src/include/access/amvalidate.h
+++ b/src/include/access/amvalidate.h
@@ -29,7 +29,7 @@ typedef struct OpFamilyOpFuncGroup
 /* Functions in access/index/amvalidate.c */
 extern List *identify_opfamily_groups(CatCList *oprlist, CatCList *proclist);
 extern bool check_amproc_signature(Oid funcid, Oid restype, bool exact,
-								   int minargs, int maxargs,...);
+								   int minargs, int maxargs, ...);
 extern bool check_amoptsproc_signature(Oid funcid);
 extern bool check_amop_signature(Oid opno, Oid restype,
 								 Oid lefttype, Oid righttype);
diff --git a/src/include/backup/walsummary.h b/src/include/backup/walsummary.h
index 60157e0ac50..093b42df473 100644
--- a/src/include/backup/walsummary.h
+++ b/src/include/backup/walsummary.h
@@ -44,6 +44,6 @@ extern void RemoveWalSummaryIfOlderThan(WalSummaryFile *ws,

 /*

 

 
 #endif							/* PERCENTREPL_H */
diff --git a/src/include/fe_utils/option_utils.h b/src/include/fe_utils/option_utils.h
index d975db77af2..f70b6159099 100644
--- a/src/include/fe_utils/option_utils.h
+++ b/src/include/fe_utils/option_utils.h
@@ -24,7 +24,7 @@ extern bool option_parse_int(const char *optarg, const char *optname,
 							 int *result);
 extern bool parse_sync_method(const char *optarg,
 							  DataDirSyncMethod *sync_method);
-extern void check_mut_excl_opts_internal(int n,...);
+extern void check_mut_excl_opts_internal(int n, ...);
 
 /* see comment for check_mut_excl_opts_internal() in option_utils.c for info */
 #define check_mut_excl_opts(set, opt, ...) \
diff --git a/src/include/jit/llvmjit_emit.h b/src/include/jit/llvmjit_emit.h
index 089945391ee..0e089b9569b 100644
--- a/src/include/jit/llvmjit_emit.h
+++ b/src/include/jit/llvmjit_emit.h
@@ -159,14 +159,14 @@ l_load_gep1(LLVMBuilderRef b, LLVMTypeRef t, LLVMValueRef v, LLVMValueRef idx, c
 }

 /*

 /*

 
 #ifndef WIN32
 /*

 

 

 
 /*

 

 
 #endif							/* ELOG_H */

 #endif							/* PALLOC_H */
 
 bool

 bool
 
 bool
index c92f0aa1081..18243bfc568 100644
index ba41732dec6..bac9d2cc39f 100644
@@ -2289,7 +2289,7 @@ fail:
index 40ea174ae9f..354a2e731fc 100644
 
 void

 

 
index 23de98290c9..60ed4c87d83 100644
@@ -753,7 +753,7 @@ extern char *pqResultStrdup(PGresult *res, const char *str);
@@ -957,8 +957,8 @@ extern char *libpq_ngettext(const char *msgid, const char *msgid_plural, unsigne
  */
 #undef _

 /*

 

 

 
 int
 
 int
 
 int
 
 int
 
 int

 /*

 

 /*

 static void

 static void

 static void

 static void
 
-- 
2.47.3

---

From: Jelte Fennema-Nio <[email-masked]>
Date: Tue, 31 Mar 2026 09:16:40 +0200

> Rebased it again.

I agree this looks better. So seems like a reasonable improvement.