=== Applying patches on top of PostgreSQL commit ID e5aff2aa63a72e4329405dd1404c184f7d439107 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Fri Aug 21 22:31:31 UTC 2026 On branch cf/7177 nothing to commit, working tree clean === using 'git am' to apply patch ./v1-0001-Use-the-vacuum-buffer-access-strategy-in-GIN-pend.patch === Applying: Use the vacuum buffer access strategy in GIN pending-list cleanup. Using index info to reconstruct a base tree... M src/backend/access/gin/ginfast.c M src/backend/access/gin/ginvacuum.c M src/include/access/gin_private.h Falling back to patching base and 3-way merge... Auto-merging src/include/access/gin_private.h CONFLICT (content): Merge conflict in src/include/access/gin_private.h Auto-merging src/backend/access/gin/ginvacuum.c CONFLICT (content): Merge conflict in src/backend/access/gin/ginvacuum.c Auto-merging src/backend/access/gin/ginfast.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 Use the vacuum buffer access strategy in GIN pending-list cleanup. 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 ./v1-0001-Use-the-vacuum-buffer-access-strategy-in-GIN-pend.patch === patching file src/backend/access/gin/ginfast.c Hunk #4 FAILED at 778. Hunk #5 succeeded at 832 (offset 2 lines). Hunk #6 succeeded at 856 (offset 2 lines). Hunk #7 succeeded at 979 (offset 3 lines). Hunk #8 succeeded at 1011 (offset 3 lines). Hunk #9 succeeded at 1086 (offset 3 lines). 1 out of 9 hunks FAILED -- saving rejects to file src/backend/access/gin/ginfast.c.rej patching file src/backend/access/gin/ginvacuum.c Hunk #1 FAILED at 635. Hunk #2 succeeded at 766 (offset 16 lines). Hunk #3 succeeded at 781 (offset 16 lines). 1 out of 3 hunks FAILED -- saving rejects to file src/backend/access/gin/ginvacuum.c.rej patching file src/include/access/gin_private.h Hunk #1 FAILED at 469. 1 out of 1 hunk FAILED -- saving rejects to file src/include/access/gin_private.h.rej Unstaged changes after reset: M src/backend/access/gin/ginfast.c M src/backend/access/gin/ginvacuum.c Removing src/backend/access/gin/ginfast.c.rej Removing src/backend/access/gin/ginvacuum.c.rej Removing src/include/access/gin_private.h.rej === using 'git apply' to apply patch ./v1-0001-Use-the-vacuum-buffer-access-strategy-in-GIN-pend.patch === Applied patch to 'src/backend/access/gin/ginfast.c' cleanly. Applied patch to 'src/backend/access/gin/ginvacuum.c' with conflicts. Applied patch to 'src/include/access/gin_private.h' with conflicts. U src/backend/access/gin/ginvacuum.c U src/include/access/gin_private.h diff --cc src/backend/access/gin/ginvacuum.c index d69d59748b5,e8baf419674..00000000000 --- a/src/backend/access/gin/ginvacuum.c +++ b/src/backend/access/gin/ginvacuum.c @@@ -640,20 -630,14 +640,29 @@@ ginbulkdelete(IndexVacuumInfo *info, In { /* Yes, so initialize stats to zeroes */ stats = palloc0_object(IndexBulkDeleteResult); ++<<<<<<< ours ++======= + + /* + * and cleanup any pending inserts + */ + ginInsertCleanup(&gvs.ginstate, !AmAutoVacuumWorkerProcess(), + false, true, stats, info->strategy); ++>>>>>>> theirs } + /* + * The pending list might have already-dead TIDs that VACUUM now requires + * us to remove from the index. We must force cleanup of the pending list + * now, before vacuuming proper begins, to make sure nothing is missed. + * + * When running in an autovacuum worker, we won't necessarily _fully_ + * empty the pending list. This is still safe; concurrent inserters + * cannot insert new tuples whose TIDs VACUUM needs us to remove. + */ + ginInsertCleanup(&gvs.ginstate, !AmAutoVacuumWorkerProcess(), + false, true, stats); + /* we'll re-count the tuples each time */ stats->num_index_tuples = 0; gvs.result = stats; diff --cc src/include/access/gin_private.h index 3c5fd6ba817,7319242cd16..00000000000 --- a/src/include/access/gin_private.h +++ b/src/include/access/gin_private.h @@@ -468,8 -468,10 +468,15 @@@ extern void ginHeapTupleFastCollect(Gin GinTupleCollector *collector, OffsetNumber attnum, Datum value, bool isNull, ItemPointer ht_ctid); ++<<<<<<< ours +extern void ginInsertCleanup(GinState *ginstate, bool must_empty_list, + bool fill_fsm, bool forceCleanup, IndexBulkDeleteResult *stats); ++======= + extern void ginInsertCleanup(GinState *ginstate, bool full_clean, + bool fill_fsm, bool forceCleanup, + IndexBulkDeleteResult *stats, + BufferAccessStrategy strategy); ++>>>>>>> theirs /* ginpostinglist.c */