agora inbox for [email protected]help / color / mirror / Atom feed
[PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber 159+ messages / 2 participants [nested] [flat]
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber @ 2025-10-31 16:05 Álvaro Herrera <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Álvaro Herrera @ 2025-10-31 16:05 UTC (permalink / raw) This is a simple bool --- src/bin/pg_basebackup/pg_createsubscriber.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 52e7c9212a2..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -156,12 +156,6 @@ static char *subscriber_dir = NULL; static bool recovery_ended = false; static bool standby_running = false; -enum WaitPMResult -{ - POSTMASTER_READY, - POSTMASTER_STILL_STARTING -}; - /* * Cleanup objects that were created by pg_createsubscriber if there is an @@ -1584,7 +1578,7 @@ static void wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions *opt) { PGconn *conn; - int status = POSTMASTER_STILL_STARTING; + bool ready = false; int timer = 0; pg_log_info("waiting for the target server to reach the consistent state"); @@ -1596,7 +1590,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions /* Did the recovery process finish? We're done if so. */ if (dry_run || !server_is_in_recovery(conn)) { - status = POSTMASTER_READY; + ready = true; recovery_ended = true; break; } @@ -1616,7 +1610,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions disconnect_database(conn, false); - if (status == POSTMASTER_STILL_STARTING) + if (!ready) pg_fatal("server did not end recovery"); pg_log_info("target server reached the consistent state"); -- 2.47.3 --iqvkb7rmsfgsymxy-- ^ permalink raw reply [nested|flat] 159+ messages in thread
* [PATCH v1] Fix DROP PROPERTY GRAPH "unsupported object class" error @ 2026-04-22 15:01 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 159+ messages in thread From: Bertrand Drouvot @ 2026-04-22 15:01 UTC (permalink / raw) getObjectTypeDescription() and getObjectIdentityParts() are missing switch cases for PropgraphElementLabelRelationId and PropgraphLabelPropertyRelationId, causing DROP PROPERTY GRAPH to hit the default case and error out with "unsupported object class". The bug only manifests when an event trigger is active, because that is what calls these functions. This commit adds the missing cases so that DROP PROPERTY GRAPH, DROP PROPERTY GRAPH IF EXISTS, and DROP SCHEMA CASCADE on schemas containing property graphs all work correctly when event triggers are present. It also adds test cases that create an event trigger and then exercise DROP PROPERTY GRAPH and DROP SCHEMA CASCADE with property graphs. Author: Bertrand Drouvot <[email protected]> --- src/backend/catalog/objectaddress.c | 93 +++++++++++++++++++ .../expected/create_property_graph.out | 36 +++++++ .../regress/sql/create_property_graph.sql | 36 +++++++ 3 files changed, 165 insertions(+) 54.5% src/backend/catalog/ 24.2% src/test/regress/expected/ 21.1% src/test/regress/sql/ diff --git a/src/backend/catalog/objectaddress.c b/src/backend/catalog/objectaddress.c index c1862809577..e2d6d8f71f6 100644 --- a/src/backend/catalog/objectaddress.c +++ b/src/backend/catalog/objectaddress.c @@ -4901,10 +4901,18 @@ getObjectTypeDescription(const ObjectAddress *object, bool missing_ok) appendStringInfoString(&buffer, "policy"); break; + case PropgraphElementLabelRelationId: + appendStringInfoString(&buffer, "property graph element label"); + break; + case PropgraphElementRelationId: appendStringInfoString(&buffer, "property graph element"); break; + case PropgraphLabelPropertyRelationId: + appendStringInfoString(&buffer, "property graph label property"); + break; + case PropgraphLabelRelationId: appendStringInfoString(&buffer, "property graph label"); break; @@ -6161,6 +6169,49 @@ getObjectIdentityParts(const ObjectAddress *object, break; } + case PropgraphElementLabelRelationId: + { + Relation ellabelDesc; + ScanKeyData skey[1]; + SysScanDesc ellabelscan; + HeapTuple tup; + Form_pg_propgraph_element_label pgelform; + ObjectAddress oa; + + ellabelDesc = table_open(PropgraphElementLabelRelationId, AccessShareLock); + ScanKeyInit(&skey[0], + Anum_pg_propgraph_element_label_oid, + BTEqualStrategyNumber, F_OIDEQ, + ObjectIdGetDatum(object->objectId)); + + ellabelscan = systable_beginscan(ellabelDesc, + PropgraphElementLabelObjectIndexId, + true, NULL, 1, skey); + + tup = systable_getnext(ellabelscan); + if (!HeapTupleIsValid(tup)) + { + if (!missing_ok) + elog(ERROR, "could not find tuple for element label %u", + object->objectId); + + systable_endscan(ellabelscan); + table_close(ellabelDesc, AccessShareLock); + break; + } + + pgelform = (Form_pg_propgraph_element_label) GETSTRUCT(tup); + + ObjectAddressSet(oa, PropgraphElementRelationId, pgelform->pgelelid); + + appendStringInfoString(&buffer, getObjectIdentityParts(&oa, objname, + objargs, false)); + + systable_endscan(ellabelscan); + table_close(ellabelDesc, AccessShareLock); + break; + } + case PropgraphElementRelationId: { HeapTuple tup; @@ -6184,6 +6235,48 @@ getObjectIdentityParts(const ObjectAddress *object, break; } + case PropgraphLabelPropertyRelationId: + { + Relation lblpropDesc; + ScanKeyData skey[1]; + SysScanDesc lblpropscan; + HeapTuple tup; + Form_pg_propgraph_label_property plpform; + ObjectAddress oa; + + lblpropDesc = table_open(PropgraphLabelPropertyRelationId, + AccessShareLock); + ScanKeyInit(&skey[0], + Anum_pg_propgraph_label_property_oid, + BTEqualStrategyNumber, F_OIDEQ, + ObjectIdGetDatum(object->objectId)); + + lblpropscan = systable_beginscan(lblpropDesc, PropgraphLabelPropertyObjectIndexId, + true, NULL, 1, skey); + + tup = systable_getnext(lblpropscan); + if (!HeapTupleIsValid(tup)) + { + if (!missing_ok) + elog(ERROR, "could not find tuple for label property %u", + object->objectId); + + systable_endscan(lblpropscan); + table_close(lblpropDesc, AccessShareLock); + break; + } + + plpform = (Form_pg_propgraph_label_property) GETSTRUCT(tup); + + ObjectAddressSet(oa, PropgraphElementLabelRelationId, plpform->plpellabelid); + appendStringInfoString(&buffer, getObjectIdentityParts(&oa, objname, + objargs, false)); + + systable_endscan(lblpropscan); + table_close(lblpropDesc, AccessShareLock); + break; + } + case PropgraphLabelRelationId: { HeapTuple tup; diff --git a/src/test/regress/expected/create_property_graph.out b/src/test/regress/expected/create_property_graph.out index bc9a596ec89..942a1294b15 100644 --- a/src/test/regress/expected/create_property_graph.out +++ b/src/test/regress/expected/create_property_graph.out @@ -922,5 +922,41 @@ ALTER PROPERTY GRAPH IF EXISTS g1 SET SCHEMA create_property_graph_tests_2; NOTICE: relation "g1" does not exist, skipping DROP PROPERTY GRAPH IF EXISTS g1; NOTICE: property graph "g1" does not exist, skipping +-- Test DROP PROPERTY GRAPH with dependency resolution +RESET search_path; +CREATE FUNCTION dpg_evt_func() RETURNS event_trigger +LANGUAGE plpgsql AS $$ +BEGIN END; +$$; +CREATE EVENT TRIGGER dpg_evt ON ddl_command_end EXECUTE FUNCTION dpg_evt_func(); +CREATE TABLE dpg_t1 (id int PRIMARY KEY, val text); +CREATE TABLE dpg_t2 (id int PRIMARY KEY, src int, dst int); +CREATE PROPERTY GRAPH dpg_test + VERTEX TABLES (dpg_t1 KEY (id) LABEL person PROPERTIES (val AS name)) + EDGE TABLES (dpg_t2 KEY (id) + SOURCE KEY (src) REFERENCES dpg_t1 (id) + DESTINATION KEY (dst) REFERENCES dpg_t1 (id) + LABEL knows); +DROP PROPERTY GRAPH dpg_test; +-- table survives graph drop +SELECT COUNT(*) FROM dpg_t1; + count +------- + 0 +(1 row) + +DROP TABLE dpg_t1, dpg_t2; +-- Test DROP SCHEMA CASCADE with property graphs inside +CREATE SCHEMA dpg_schema; +SET search_path = dpg_schema; +CREATE TABLE t (id int PRIMARY KEY); +CREATE PROPERTY GRAPH g VERTEX TABLES (t KEY (id)); +RESET search_path; +DROP SCHEMA dpg_schema CASCADE; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to table dpg_schema.t +drop cascades to property graph dpg_schema.g +DROP EVENT TRIGGER dpg_evt; +DROP FUNCTION dpg_evt_func; DROP ROLE regress_graph_user1, regress_graph_user2; -- leave remaining objects behind for pg_upgrade/pg_dump tests diff --git a/src/test/regress/sql/create_property_graph.sql b/src/test/regress/sql/create_property_graph.sql index 241f93df302..857098dadc8 100644 --- a/src/test/regress/sql/create_property_graph.sql +++ b/src/test/regress/sql/create_property_graph.sql @@ -360,6 +360,42 @@ ALTER PROPERTY GRAPH g1 ADD VERTEX TABLES (t1 KEY (a)); -- error ALTER PROPERTY GRAPH IF EXISTS g1 SET SCHEMA create_property_graph_tests_2; DROP PROPERTY GRAPH IF EXISTS g1; + +-- Test DROP PROPERTY GRAPH with dependency resolution + +RESET search_path; +CREATE FUNCTION dpg_evt_func() RETURNS event_trigger +LANGUAGE plpgsql AS $$ +BEGIN END; +$$; + +CREATE EVENT TRIGGER dpg_evt ON ddl_command_end EXECUTE FUNCTION dpg_evt_func(); + +CREATE TABLE dpg_t1 (id int PRIMARY KEY, val text); +CREATE TABLE dpg_t2 (id int PRIMARY KEY, src int, dst int); +CREATE PROPERTY GRAPH dpg_test + VERTEX TABLES (dpg_t1 KEY (id) LABEL person PROPERTIES (val AS name)) + EDGE TABLES (dpg_t2 KEY (id) + SOURCE KEY (src) REFERENCES dpg_t1 (id) + DESTINATION KEY (dst) REFERENCES dpg_t1 (id) + LABEL knows); +DROP PROPERTY GRAPH dpg_test; + +-- table survives graph drop +SELECT COUNT(*) FROM dpg_t1; +DROP TABLE dpg_t1, dpg_t2; + +-- Test DROP SCHEMA CASCADE with property graphs inside +CREATE SCHEMA dpg_schema; +SET search_path = dpg_schema; +CREATE TABLE t (id int PRIMARY KEY); +CREATE PROPERTY GRAPH g VERTEX TABLES (t KEY (id)); +RESET search_path; +DROP SCHEMA dpg_schema CASCADE; + +DROP EVENT TRIGGER dpg_evt; +DROP FUNCTION dpg_evt_func; + DROP ROLE regress_graph_user1, regress_graph_user2; -- leave remaining objects behind for pg_upgrade/pg_dump tests -- 2.34.1 --s/7v445LwpBnK/Gl-- ^ permalink raw reply [nested|flat] 159+ messages in thread
end of thread, other threads:[~2026-04-22 15:01 UTC | newest] Thread overview: 159+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2025-10-31 16:05 [PATCH 2/2] Remove WaitPMResult enum in pg_createsubscriber Álvaro Herrera <[email protected]> 2026-04-22 15:01 [PATCH v1] Fix DROP PROPERTY GRAPH "unsupported object class" error Bertrand Drouvot <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox