=== Applying patches on top of PostgreSQL commit ID 9018c7d37bb464cd53567c0b553a6f49b50bec78 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Sun Apr 19 15:48:20 UTC 2026 On branch cf/6188 nothing to commit, working tree clean === using 'git am' to apply patch ./v2-0001-Report-oldest-xmin-blocker-when-VACUUM-cannot-rem.patch === Applying: Report oldest xmin blocker when VACUUM cannot remove tuples Using index info to reconstruct a base tree... M src/backend/access/heap/vacuumlazy.c M src/backend/access/transam/twophase.c M src/backend/storage/ipc/procarray.c M src/include/access/twophase.h M src/include/storage/procarray.h M src/test/modules/test_misc/meson.build M src/tools/pgindent/typedefs.list Falling back to patching base and 3-way merge... Auto-merging src/tools/pgindent/typedefs.list Auto-merging src/test/modules/test_misc/meson.build CONFLICT (content): Merge conflict in src/test/modules/test_misc/meson.build Auto-merging src/include/storage/procarray.h CONFLICT (content): Merge conflict in src/include/storage/procarray.h Auto-merging src/include/access/twophase.h Auto-merging src/backend/storage/ipc/procarray.c Auto-merging src/backend/access/transam/twophase.c Auto-merging src/backend/access/heap/vacuumlazy.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 Report oldest xmin blocker when VACUUM cannot remove tuples 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 ./v2-0001-Report-oldest-xmin-blocker-when-VACUUM-cannot-rem.patch === patching file src/backend/access/heap/vacuumlazy.c Hunk #1 succeeded at 151 with fuzz 2 (offset 1 line). Hunk #2 succeeded at 1075 (offset 16 lines). patching file src/backend/access/transam/twophase.c Hunk #1 succeeded at 2822 (offset 6 lines). patching file src/backend/storage/ipc/procarray.c Hunk #1 FAILED at 58. Hunk #2 succeeded at 1999 (offset -6 lines). 1 out of 2 hunks FAILED -- saving rejects to file src/backend/storage/ipc/procarray.c.rej patching file src/include/access/twophase.h Hunk #1 succeeded at 70 (offset 2 lines). patching file src/include/storage/procarray.h Hunk #1 FAILED at 14. 1 out of 2 hunks FAILED -- saving rejects to file src/include/storage/procarray.h.rej patching file src/test/modules/test_misc/meson.build Hunk #1 FAILED at 19. 1 out of 1 hunk FAILED -- saving rejects to file src/test/modules/test_misc/meson.build.rej patching file src/test/modules/test_misc/t/011_log_vacuum_blockers.pl patching file src/tools/pgindent/typedefs.list Hunk #1 succeeded at 3522 (offset 91 lines). Unstaged changes after reset: M src/backend/access/heap/vacuumlazy.c M src/backend/access/transam/twophase.c M src/backend/storage/ipc/procarray.c M src/include/access/twophase.h M src/include/storage/procarray.h M src/tools/pgindent/typedefs.list Removing src/backend/storage/ipc/procarray.c.rej Removing src/include/storage/procarray.h.rej Removing src/test/modules/test_misc/meson.build.rej Removing src/test/modules/test_misc/t/011_log_vacuum_blockers.pl === using 'git apply' to apply patch ./v2-0001-Report-oldest-xmin-blocker-when-VACUUM-cannot-rem.patch === Applied patch to 'src/backend/access/heap/vacuumlazy.c' cleanly. Applied patch to 'src/backend/access/transam/twophase.c' cleanly. Applied patch to 'src/backend/storage/ipc/procarray.c' cleanly. Applied patch to 'src/include/access/twophase.h' cleanly. Applied patch to 'src/include/storage/procarray.h' with conflicts. Applied patch to 'src/test/modules/test_misc/meson.build' with conflicts. Falling back to direct application... Applied patch to 'src/tools/pgindent/typedefs.list' cleanly. U src/include/storage/procarray.h U src/test/modules/test_misc/meson.build diff --cc src/include/storage/procarray.h index ec89c448220,4c13f4df12b..00000000000 --- a/src/include/storage/procarray.h +++ b/src/include/storage/procarray.h @@@ -14,11 -14,49 +14,50 @@@ #ifndef PROCARRAY_H #define PROCARRAY_H ++<<<<<<< ours ++======= + #include "access/xact.h" + #include "storage/lock.h" ++>>>>>>> theirs #include "storage/standby.h" #include "utils/relcache.h" #include "utils/snapshot.h" + /* + * Type of blocker that is holding back the xid horizon. + * Listed in priority order from highest to lowest. Blockers whose xid + * matches the horizon (the root cause) are listed before blockers whose + * xmin matches (held back by the root cause). Within each group, active + * transactions are listed first because they are the most actionable for + * the DBA (the running query can be identified and cancelled). + */ + typedef enum XidHorizonBlockerType + { + XHB_NONE = 0, + /* xid-match types (horizon == proc's xid) */ + XHB_ACTIVE_TRANSACTION, /* backend running a statement */ + XHB_IDLE_IN_TRANSACTION, /* backend idle in transaction */ + XHB_PREPARED_TRANSACTION, /* prepared (two-phase) transaction */ + /* xmin-match types (horizon == proc's xmin or slot's xmin) */ + XHB_XMIN_ACTIVE_TRANSACTION, /* backend running a statement */ + XHB_XMIN_IDLE_IN_TRANSACTION, /* backend idle in transaction */ + XHB_HOT_STANDBY_FEEDBACK, /* walsender with hot_standby_feedback */ + XHB_REPLICATION_SLOT, /* logical replication slot */ + } XidHorizonBlockerType; + + /* + * Information about a blocker that is holding back the xid horizon. + */ + typedef struct XidHorizonBlocker + { + XidHorizonBlockerType type; + TransactionId xid; /* the blocking xid/xmin */ + int pid; /* backend pid (0 for slots) */ + /* large enough for prepared-txn GID or replication slot name */ + char name[Max(GIDSIZE, NAMEDATALEN)]; + } XidHorizonBlocker; + -extern Size ProcArrayShmemSize(void); -extern void ProcArrayShmemInit(void); extern void ProcArrayAdd(PGPROC *proc); extern void ProcArrayRemove(PGPROC *proc, TransactionId latestXid); diff --cc src/test/modules/test_misc/meson.build index 1b25d98f7f3,d3b92e20737..00000000000 --- a/src/test/modules/test_misc/meson.build +++ b/src/test/modules/test_misc/meson.build @@@ -19,7 -19,7 +19,11 @@@ tests += 't/008_replslot_single_user.pl', 't/009_log_temp_files.pl', 't/010_index_concurrently_upsert.pl', ++<<<<<<< ours + 't/011_lock_stats.pl', ++======= + 't/011_log_vacuum_blockers.pl', ++>>>>>>> theirs ], # The injection points are cluster-wide, so disable installcheck 'runningcheck': false,