=== Applying patches on top of PostgreSQL commit ID 46b4ba533cee9f64a60714d91607e74362abf67f === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Tue Apr 8 04:09:21 UTC 2025 On branch cf/5568 nothing to commit, working tree clean === using 'git am' to apply patch ./v6-PG16-0001-Stabilize-035_standby_logical_decoding.pl.patch === Applying: Stabilize 035_standby_logical_decoding.pl. Using index info to reconstruct a base tree... M src/test/recovery/t/035_standby_logical_decoding.pl Falling back to patching base and 3-way merge... Auto-merging src/test/recovery/t/035_standby_logical_decoding.pl === using 'git am' to apply patch ./v6-PG17-0001-Stabilize-035_standby_logical_decoding.pl.patch === Applying: Stabilize 035_standby_logical_decoding.pl. Using index info to reconstruct a base tree... M src/test/recovery/t/035_standby_logical_decoding.pl Falling back to patching base and 3-way merge... Auto-merging src/test/recovery/t/035_standby_logical_decoding.pl CONFLICT (content): Merge conflict in src/test/recovery/t/035_standby_logical_decoding.pl error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 Stabilize 035_standby_logical_decoding.pl. 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". Unstaged changes after reset: M src/test/recovery/t/035_standby_logical_decoding.pl === using patch(1) to apply patch ./v6-PG17-0001-Stabilize-035_standby_logical_decoding.pl.patch === patch: unrecognized option `--no-backup-if-mismatch' usage: patch [-bCcEeflNnRstuv] [-B backup-prefix] [-D symbol] [-d directory] [-F max-fuzz] [-i patchfile] [-o out-file] [-p strip-count] [-r rej-name] [-V t | nil | never | none] [-x number] [-z backup-ext] [--posix] [origfile [patchfile]] patch stop ################################################## # Recovery conflict: Invalidate conflicting slots # Scenario 1: hot_standby_feedback off and vacuum FULL ++<<<<<<< ours +# +# In passing, ensure that replication slot stats are not removed when the +# active slot is invalidated, and check that an error occurs when +# attempting to alter the invalid slot. ++======= ++>>>>>>> theirs ################################################## # One way to produce recovery conflict is to create/drop a relation and @@@ -570,25 -565,6 +569,28 @@@ check_for_invalidation('vacuum_full_', # Verify reason for conflict is 'rows_removed' in pg_replication_slots check_slots_conflict_reason('vacuum_full_', 'rows_removed'); ++<<<<<<< ours +# Attempting to alter an invalidated slot should result in an error +($result, $stdout, $stderr) = $node_standby->psql( + 'postgres', + qq[ALTER_REPLICATION_SLOT vacuum_full_inactiveslot (failover);], + replication => 'database'); +ok( $stderr =~ + /ERROR: can no longer access replication slot "vacuum_full_inactiveslot"/ + && $stderr =~ + /DETAIL: This replication slot has been invalidated due to "rows_removed"./, + "invalidated slot cannot be altered"); + +# Ensure that replication slot stats are not removed after invalidation. +is( $node_standby->safe_psql( + 'testdb', + qq[SELECT total_txns > 0 FROM pg_stat_replication_slots WHERE slot_name = 'vacuum_full_activeslot'] + ), + 't', + 'replication slot stats not removed after invalidation'); + ++======= ++>>>>>>> theirs $handle = make_slot_active($node_standby, 'vacuum_full_', 0, \$stdout, \$stderr);