Hi Bharath, Thank you for the patch, I tested v3 on top of c074737f687.
I have a few comments: 1. v3 now runs lazy_check_wraparound_failsafe() after the parallel index pass only when the shared flag is set; master (and v1/v2) ran it unconditionally. Was dropping it intentional? It's cheap, and it still matters in one corner case which is parallel workers use the GUC values serialized when the parallel context was set up, while an autovacuum leader can reload vacuum_failsafe_age while it waits for them. If vacuum_failsafe_age is lowered at that point, only the leader's recheck would notice it. I can share a reproducer if that's useful (doesn't happen in normal scenarios) 2. The TAP test only counts the per-index lines. Could it also check for the "bypassing nonessential maintenance" WARNING? That confirms the leader actually entered failsafe mode, not just that indexes were skipped. Apart from that, the patch behaved as expected in the other cases I tried: i) manual VACUUM (VERBOSE, PARALLEL 2) with 6 indexes: 3 vacuumed, 3 skipped, WARNING emitted, index reltuples left untouched; ii) leader-only indexes (below min_parallel_index_scan_size) mixed with parallel ones: the remaining leader-only and parallel indexes are both skipped once the flag is set; iii) failsafe triggered in the second index pass (maintenance_work_mem = 512kB): no "parallel index vacuum on index ... is not completed" error, and the WARNING says "after 1 index scans"; iv) workers planned but none launched (max_parallel_workers = 0): the leader sets the flag itself and skips the rest. Regards, Surya Poondla
