Hi Alvaro,

> I would prefer to have a way to transmit the effective values from the
> leader backend to the worker

Done in v2, through the DSM segment the worker already attaches to.

Only lock_timeout and transaction_timeout are passed. A bgworker never
arms statement_timeout or idle_in_transaction_session_timeout. v1 have
because it aligns with the autovacuum worker.

One behavior change from v1. v1 turned the timeouts off, so REPACK always
got through. v2 uses the caller's values instead, so if the caller has a
lock_timeout of its own, the command can still be cancelled.

The difference is that it is now cancelled by a value the
caller sees in SHOW and can override with SET, rather than by one coming
from the owner role that the caller cannot reach at all.

I did consider SerializeGUCState, but that seems too much.

Applies cleanly to master and REL_19_STABLE.

Regards,
Shihao

Attachment: v2-0001-Pass-the-backend-s-timeout-settings-to-the-REPACK.patch
Description: Binary data

Reply via email to