=== Applying patches on top of PostgreSQL commit ID 5142f0093e648d1a32fdcc7c835d17fa103e1239 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Mon Apr 20 02:28:22 UTC 2026 On branch cf/6508 nothing to commit, working tree clean === using 'git am' to apply patch ./v5-0001-Make-pgindent-add-a-space-between-comma-and-perio.patch === Applying: Make pgindent add a space between comma and period === using 'git am' to apply patch ./v5-0002-Run-pgindent-add-a-space-between-comma-and-period.patch === Applying: Run pgindent add a space between comma and period Using index info to reconstruct a base tree... M src/backend/utils/adt/ddlutils.c M src/backend/utils/error/elog.c M src/bin/pg_basebackup/pg_createsubscriber.c M src/bin/pg_ctl/pg_ctl.c M src/bin/psql/tab-complete.in.c M src/common/logging.c M src/include/common/logging.h M src/include/port.h M src/test/regress/pg_regress.c Falling back to patching base and 3-way merge... Auto-merging src/test/regress/pg_regress.c Auto-merging src/include/port.h Auto-merging src/include/common/logging.h Auto-merging src/common/logging.c Auto-merging src/bin/psql/tab-complete.in.c Auto-merging src/bin/pg_ctl/pg_ctl.c Auto-merging src/bin/pg_basebackup/pg_createsubscriber.c CONFLICT (content): Merge conflict in src/bin/pg_basebackup/pg_createsubscriber.c Auto-merging src/backend/utils/error/elog.c Auto-merging src/backend/utils/adt/ddlutils.c error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 Run pgindent add a space between comma and period When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". === using patch(1) to apply patch ./v5-0002-Run-pgindent-add-a-space-between-comma-and-period.patch === patching file contrib/dblink/dblink.c patching file contrib/fuzzystrmatch/dmetaphone.c patching file contrib/jsonb_plpython/jsonb_plpython.c patching file contrib/pgcrypto/px.c patching file contrib/pgcrypto/px.h patching file contrib/postgres_fdw/postgres_fdw.c patching file src/backend/access/index/amvalidate.c patching file src/backend/access/transam/xlogreader.c patching file src/backend/backup/basebackup_incremental.c patching file src/backend/backup/walsummary.c patching file src/backend/lib/rbtree.c patching file src/backend/utils/adt/ddlutils.c patching file src/backend/utils/error/elog.c Hunk #1 succeeded at 1091 (offset 1 line). Hunk #2 succeeded at 1346 (offset 1 line). Hunk #3 succeeded at 1370 (offset 1 line). Hunk #4 succeeded at 1392 (offset 1 line). Hunk #5 succeeded at 1419 (offset 1 line). Hunk #6 succeeded at 1440 (offset 1 line). Hunk #7 succeeded at 1462 (offset 1 line). Hunk #8 succeeded at 1485 (offset 1 line). Hunk #9 succeeded at 1506 (offset 1 line). Hunk #10 succeeded at 1528 (offset 1 line). Hunk #11 succeeded at 1550 (offset 1 line). Hunk #12 succeeded at 1575 (offset 1 line). Hunk #13 succeeded at 1847 (offset 1 line). Hunk #14 succeeded at 4226 (offset 1 line). patching file src/backend/utils/error/jsonlog.c patching file src/backend/utils/misc/guc.c patching file src/bin/pg_basebackup/pg_createsubscriber.c Hunk #1 FAILED at 152. Hunk #2 FAILED at 224. Hunk #3 FAILED at 239. 3 out of 3 hunks FAILED -- saving rejects to file src/bin/pg_basebackup/pg_createsubscriber.c.rej patching file src/bin/pg_combinebackup/load_manifest.c patching file src/bin/pg_ctl/pg_ctl.c patching file src/bin/pg_dump/filter.c patching file src/bin/pg_dump/filter.h patching file src/bin/pg_dump/pg_backup.h patching file src/bin/pg_dump/pg_backup_archiver.c patching file src/bin/pg_dump/pg_backup_archiver.h patching file src/bin/pg_dump/pg_backup_tar.c patching file src/bin/pg_upgrade/exec.c patching file src/bin/pg_upgrade/parallel.c patching file src/bin/pg_upgrade/pg_upgrade.h patching file src/bin/pg_upgrade/server.c patching file src/bin/pg_upgrade/util.c patching file src/bin/pg_verifybackup/pg_verifybackup.c patching file src/bin/pg_verifybackup/pg_verifybackup.h patching file src/bin/pg_walsummary/pg_walsummary.c patching file src/bin/psql/large_obj.c patching file src/bin/psql/tab-complete.in.c patching file src/common/logging.c Hunk #1 succeeded at 220 (offset 14 lines). patching file src/common/percentrepl.c patching file src/common/psprintf.c patching file src/common/stringinfo.c patching file src/fe_utils/option_utils.c patching file src/include/access/amvalidate.h patching file src/include/backup/walsummary.h patching file src/include/common/blkreftable.h patching file src/include/common/fe_memutils.h patching file src/include/common/logging.h Hunk #1 succeeded at 95 with fuzz 1 (offset 2 lines). patching file src/include/common/parse_manifest.h patching file src/include/common/percentrepl.h patching file src/include/fe_utils/option_utils.h patching file src/include/jit/llvmjit_emit.h patching file src/include/lib/stringinfo.h patching file src/include/port.h patching file src/include/utils/elog.h patching file src/include/utils/palloc.h patching file src/interfaces/ecpg/ecpglib/descriptor.c patching file src/interfaces/ecpg/ecpglib/ecpglib_extern.h patching file src/interfaces/ecpg/ecpglib/execute.c patching file src/interfaces/ecpg/ecpglib/misc.c patching file src/interfaces/ecpg/include/ecpglib.h patching file src/interfaces/ecpg/preproc/preproc_extern.h patching file src/interfaces/ecpg/preproc/util.c patching file src/interfaces/libpq/fe-exec.c patching file src/interfaces/libpq/fe-misc.c patching file src/interfaces/libpq/libpq-int.h patching file src/interfaces/libpq/pqexpbuffer.c patching file src/interfaces/libpq/pqexpbuffer.h patching file src/pl/plpython/plpy_elog.c patching file src/pl/plpython/plpy_elog.h patching file src/port/open.c patching file src/port/snprintf.c patching file src/port/win32security.c patching file src/test/modules/libpq_pipeline/libpq_pipeline.c patching file src/test/regress/pg_regress.c patching file src/timezone/zic.c patching file src/tools/pg_bsd_indent/tests/declarations.0.stdout Unstaged changes after reset: M contrib/dblink/dblink.c M contrib/fuzzystrmatch/dmetaphone.c M contrib/jsonb_plpython/jsonb_plpython.c M contrib/pgcrypto/px.c M contrib/pgcrypto/px.h M contrib/postgres_fdw/postgres_fdw.c M src/backend/access/index/amvalidate.c M src/backend/access/transam/xlogreader.c M src/backend/backup/basebackup_incremental.c M src/backend/backup/walsummary.c M src/backend/lib/rbtree.c M src/backend/utils/adt/ddlutils.c M src/backend/utils/error/elog.c M src/backend/utils/error/jsonlog.c M src/backend/utils/misc/guc.c M src/bin/pg_combinebackup/load_manifest.c M src/bin/pg_ctl/pg_ctl.c M src/bin/pg_dump/filter.c M src/bin/pg_dump/filter.h M src/bin/pg_dump/pg_backup.h M src/bin/pg_dump/pg_backup_archiver.c M src/bin/pg_dump/pg_backup_archiver.h M src/bin/pg_dump/pg_backup_tar.c M src/bin/pg_upgrade/exec.c M src/bin/pg_upgrade/parallel.c M src/bin/pg_upgrade/pg_upgrade.h M src/bin/pg_upgrade/server.c M src/bin/pg_upgrade/util.c M src/bin/pg_verifybackup/pg_verifybackup.c M src/bin/pg_verifybackup/pg_verifybackup.h M src/bin/pg_walsummary/pg_walsummary.c M src/bin/psql/large_obj.c M src/bin/psql/tab-complete.in.c M src/common/logging.c M src/common/percentrepl.c M src/common/psprintf.c M src/common/stringinfo.c M src/fe_utils/option_utils.c M src/include/access/amvalidate.h M src/include/backup/walsummary.h M src/include/common/blkreftable.h M src/include/common/fe_memutils.h M src/include/common/logging.h M src/include/common/parse_manifest.h M src/include/common/percentrepl.h M src/include/fe_utils/option_utils.h M src/include/jit/llvmjit_emit.h M src/include/lib/stringinfo.h M src/include/port.h M src/include/utils/elog.h M src/include/utils/palloc.h M src/interfaces/ecpg/ecpglib/descriptor.c M src/interfaces/ecpg/ecpglib/ecpglib_extern.h M src/interfaces/ecpg/ecpglib/execute.c M src/interfaces/ecpg/ecpglib/misc.c M src/interfaces/ecpg/include/ecpglib.h M src/interfaces/ecpg/preproc/preproc_extern.h M src/interfaces/ecpg/preproc/util.c M src/interfaces/libpq/fe-exec.c M src/interfaces/libpq/fe-misc.c M src/interfaces/libpq/libpq-int.h M src/interfaces/libpq/pqexpbuffer.c M src/interfaces/libpq/pqexpbuffer.h M src/pl/plpython/plpy_elog.c M src/pl/plpython/plpy_elog.h M src/port/open.c M src/port/snprintf.c M src/port/win32security.c M src/test/modules/libpq_pipeline/libpq_pipeline.c M src/test/regress/pg_regress.c M src/timezone/zic.c M src/tools/pg_bsd_indent/tests/declarations.0.stdout Removing src/bin/pg_basebackup/pg_createsubscriber.c.rej === using 'git apply' to apply patch ./v5-0002-Run-pgindent-add-a-space-between-comma-and-period.patch === Applied patch to 'contrib/dblink/dblink.c' cleanly. Applied patch to 'contrib/fuzzystrmatch/dmetaphone.c' cleanly. Applied patch to 'contrib/jsonb_plpython/jsonb_plpython.c' cleanly. Applied patch to 'contrib/pgcrypto/px.c' cleanly. Applied patch to 'contrib/pgcrypto/px.h' cleanly. Applied patch to 'contrib/postgres_fdw/postgres_fdw.c' cleanly. Applied patch to 'src/backend/access/index/amvalidate.c' cleanly. Applied patch to 'src/backend/access/transam/xlogreader.c' cleanly. Applied patch to 'src/backend/backup/basebackup_incremental.c' cleanly. Applied patch to 'src/backend/backup/walsummary.c' cleanly. Applied patch to 'src/backend/lib/rbtree.c' cleanly. Applied patch to 'src/backend/utils/adt/ddlutils.c' cleanly. Applied patch to 'src/backend/utils/error/elog.c' cleanly. Applied patch to 'src/backend/utils/error/jsonlog.c' cleanly. Applied patch to 'src/backend/utils/misc/guc.c' cleanly. Applied patch to 'src/bin/pg_basebackup/pg_createsubscriber.c' with conflicts. Applied patch to 'src/bin/pg_combinebackup/load_manifest.c' cleanly. Applied patch to 'src/bin/pg_ctl/pg_ctl.c' cleanly. Applied patch to 'src/bin/pg_dump/filter.c' cleanly. Applied patch to 'src/bin/pg_dump/filter.h' cleanly. Applied patch to 'src/bin/pg_dump/pg_backup.h' cleanly. Applied patch to 'src/bin/pg_dump/pg_backup_archiver.c' cleanly. Applied patch to 'src/bin/pg_dump/pg_backup_archiver.h' cleanly. Applied patch to 'src/bin/pg_dump/pg_backup_tar.c' cleanly. Applied patch to 'src/bin/pg_upgrade/exec.c' cleanly. Applied patch to 'src/bin/pg_upgrade/parallel.c' cleanly. Applied patch to 'src/bin/pg_upgrade/pg_upgrade.h' cleanly. Applied patch to 'src/bin/pg_upgrade/server.c' cleanly. Applied patch to 'src/bin/pg_upgrade/util.c' cleanly. Applied patch to 'src/bin/pg_verifybackup/pg_verifybackup.c' cleanly. Applied patch to 'src/bin/pg_verifybackup/pg_verifybackup.h' cleanly. Applied patch to 'src/bin/pg_walsummary/pg_walsummary.c' cleanly. Applied patch to 'src/bin/psql/large_obj.c' cleanly. Applied patch to 'src/bin/psql/tab-complete.in.c' cleanly. Applied patch to 'src/common/logging.c' cleanly. Applied patch to 'src/common/percentrepl.c' cleanly. Applied patch to 'src/common/psprintf.c' cleanly. Applied patch to 'src/common/stringinfo.c' cleanly. Applied patch to 'src/fe_utils/option_utils.c' cleanly. Applied patch to 'src/include/access/amvalidate.h' cleanly. Applied patch to 'src/include/backup/walsummary.h' cleanly. Applied patch to 'src/include/common/blkreftable.h' cleanly. Applied patch to 'src/include/common/fe_memutils.h' cleanly. Applied patch to 'src/include/common/logging.h' cleanly. Applied patch to 'src/include/common/parse_manifest.h' cleanly. Applied patch to 'src/include/common/percentrepl.h' cleanly. Applied patch to 'src/include/fe_utils/option_utils.h' cleanly. Applied patch to 'src/include/jit/llvmjit_emit.h' cleanly. Applied patch to 'src/include/lib/stringinfo.h' cleanly. Applied patch to 'src/include/port.h' cleanly. Applied patch to 'src/include/utils/elog.h' cleanly. Applied patch to 'src/include/utils/palloc.h' cleanly. Applied patch to 'src/interfaces/ecpg/ecpglib/descriptor.c' cleanly. Applied patch to 'src/interfaces/ecpg/ecpglib/ecpglib_extern.h' cleanly. Applied patch to 'src/interfaces/ecpg/ecpglib/execute.c' cleanly. Applied patch to 'src/interfaces/ecpg/ecpglib/misc.c' cleanly. Applied patch to 'src/interfaces/ecpg/include/ecpglib.h' cleanly. Applied patch to 'src/interfaces/ecpg/preproc/preproc_extern.h' cleanly. Applied patch to 'src/interfaces/ecpg/preproc/util.c' cleanly. Applied patch to 'src/interfaces/libpq/fe-exec.c' cleanly. Applied patch to 'src/interfaces/libpq/fe-misc.c' cleanly. Applied patch to 'src/interfaces/libpq/libpq-int.h' cleanly. Applied patch to 'src/interfaces/libpq/pqexpbuffer.c' cleanly. Applied patch to 'src/interfaces/libpq/pqexpbuffer.h' cleanly. Applied patch to 'src/pl/plpython/plpy_elog.c' cleanly. Applied patch to 'src/pl/plpython/plpy_elog.h' cleanly. Applied patch to 'src/port/open.c' cleanly. Applied patch to 'src/port/snprintf.c' cleanly. Applied patch to 'src/port/win32security.c' cleanly. Applied patch to 'src/test/modules/libpq_pipeline/libpq_pipeline.c' cleanly. Applied patch to 'src/test/regress/pg_regress.c' cleanly. Applied patch to 'src/timezone/zic.c' cleanly. Applied patch to 'src/tools/pg_bsd_indent/tests/declarations.0.stdout' cleanly. U src/bin/pg_basebackup/pg_createsubscriber.c diff --cc src/bin/pg_basebackup/pg_createsubscriber.c index 15e06e5686e,bfb655243d6..00000000000 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@@ -151,6 -151,18 +151,21 @@@ static void drop_existing_subscription( const char *dbname); static void get_publisher_databases(struct CreateSubscriberOptions *opt, bool dbnamespecified); ++<<<<<<< ours ++======= + static void report_createsub_log(enum pg_log_level, enum pg_log_part, + 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_attribute_printf(1, 2); + static void internal_log_file_write(enum pg_log_level level, + enum pg_log_part part, + const char *pg_restrict fmt, va_list args) + pg_attribute_printf(3, 0); ++>>>>>>> theirs #define WAIT_INTERVAL 1 /* 1 second */ @@@ -183,6 -196,61 +198,64 @@@ static bool recovery_ended = false static bool standby_running = false; static bool recovery_params_set = false; ++<<<<<<< ours ++======= + /* + * Report a message with a given log level. + * + * Writes to stderr, and also to the log file, if --logdir option was + * specified. + */ + static void + report_createsub_log_v(enum pg_log_level level, enum pg_log_part part, + const char *pg_restrict fmt, va_list args) + { + int save_errno = errno; + + if (internal_log_file_fp != NULL) + { + /* Output to both stderr and the log file */ + va_list arg_cpy; + + va_copy(arg_cpy, args); + internal_log_file_write(level, part, fmt, arg_cpy); + va_end(arg_cpy); + /* Restore errno in case internal_log_file_write changed it */ + errno = save_errno; + } + pg_log_generic_v(level, part, fmt, args); + } + + static void + report_createsub_log(enum pg_log_level level, enum pg_log_part part, + const char *pg_restrict fmt, ...) + { + va_list args; + + va_start(args, fmt); + + report_createsub_log_v(level, part, fmt, args); + + va_end(args); + } + + /* + * Report a fatal error and exit + */ + static void + report_createsub_fatal(const char *pg_restrict fmt, ...) + { + va_list args; + + va_start(args, fmt); + + report_createsub_log_v(PG_LOG_ERROR, PG_LOG_PRIMARY, fmt, args); + + va_end(args); + + exit(1); + } ++>>>>>>> theirs /* * Clean up objects created by pg_createsubscriber.