Add REPACK progress phases for logical decoding setup. Previously, REPACK (CONCURRENTLY) reported everything it did before the heap scan as "initializing", including enabling logical decoding and setting up the logical decoding context. Setting up the context waits for the transactions that have a transaction ID assigned to end and therefore can take arbitrarily long, but users couldn't tell that wait apart from the rest of the setup.
Add two phases, "enabling logical decoding" and "initializing logical decoding". As these steps run in the decoding worker, the worker tells the backend running REPACK which phase to report through shared memory, and the backend reports it while waiting for the worker. Bump catalog version. Author: Sami Imseih <[email protected]> Reviewed-by: Masahiko Sawada <[email protected]> Reviewed-by: Manu <[email protected]> Discussion: https://postgr.es/m/CAN12%2BYJOeOyPYB5JS28VE_%2Brzg%3DRbzQXfj58TGfMYwv-TX9mJA%40mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/51ae21aa313bb6b79ad914920279cd0d89e92220 Modified Files -------------- doc/src/sgml/monitoring.sgml | 38 +++++++++++++++++++++++----------- src/backend/catalog/system_views.sql | 2 ++ src/backend/commands/repack.c | 12 +++++++++++ src/backend/commands/repack_worker.c | 28 ++++++++++++++++++++++--- src/include/catalog/catversion.h | 2 +- src/include/commands/progress.h | 2 ++ src/include/commands/repack_internal.h | 7 +++++++ src/test/regress/expected/rules.out | 2 ++ 8 files changed, 77 insertions(+), 16 deletions(-)
