Hi,

On Tue, Oct 27, 2026 at 3:24 PM Zsolt Parragi <[email protected]> wrote:
>
> One mostly nitpick question:

Thanks for taking a look at this.

> +extern bool parallel_vacuum_failsafe_triggered(ParallelVacuumState *pvs);
>  extern void parallel_vacuum_bulkdel_all_indexes(ParallelVacuumState *pvs,
>
> parallel_vacuum_bulkdel_all_indexes now might return quietly and
> process only part of the work. Previously it either errored out, or
> completed everything. Wouldn't it be be better to give it a return
> value callers can check? Existing functions, such as
> lazy_vacuum_all_indexes already do this. In this case the current
> patch seems to be safe because of the lazy_check_wraparound_failsafe
> call, but returning the status (and handling it in vacuumlazy) seems
> like a safer not heap specific API.

Yeah, that's a good point. parallel_vacuum_bulkdel_all_indexes() can
return whether the failsafe was hit by either the leader or any of the
workers. Would something like the below work for you?

if (!parallel_vacuum_bulkdel_all_indexes(...))
{
    /*
     * The failsafe was hit by either the leader or one of the parallel
     * workers, so do the reporting and the resetting work here, once per
     * VACUUM.
     */
    lazy_check_wraparound_failsafe(vacrel);
    allindexes = false;

}

--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com


Reply via email to