Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf242dbc

Browse files
committed
Remove WaitPMResult enum in pg_createsubscriber
A simple boolean suffices. This is cosmetic, so no backpatch.Author: Álvaro Herrera <alvherre@kurilemu.de>Discussion:https://postgr.es/m/202510311750.mxiykx3tp4mx@alvherre.pgsql
1 parentad25744 commitf242dbc

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

‎src/bin/pg_basebackup/pg_createsubscriber.c‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,6 @@ static char *subscriber_dir = NULL;
156156
staticboolrecovery_ended= false;
157157
staticboolstandby_running= false;
158158

159-
enumWaitPMResult
160-
{
161-
POSTMASTER_READY,
162-
POSTMASTER_STILL_STARTING
163-
};
164-
165159

166160
/*
167161
* Cleanup objects that were created by pg_createsubscriber if there is an
@@ -1584,7 +1578,7 @@ static void
15841578
wait_for_end_recovery(constchar*conninfo,conststructCreateSubscriberOptions*opt)
15851579
{
15861580
PGconn*conn;
1587-
intstatus=POSTMASTER_STILL_STARTING;
1581+
boolready=false;
15881582
inttimer=0;
15891583

15901584
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
15961590
/* Did the recovery process finish? We're done if so. */
15971591
if (dry_run|| !server_is_in_recovery(conn))
15981592
{
1599-
status=POSTMASTER_READY;
1593+
ready=true;
16001594
recovery_ended= true;
16011595
break;
16021596
}
@@ -1617,7 +1611,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions
16171611

16181612
disconnect_database(conn, false);
16191613

1620-
if (status==POSTMASTER_STILL_STARTING)
1614+
if (!ready)
16211615
pg_fatal("server did not end recovery");
16221616

16231617
pg_log_info("target server reached the consistent state");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp