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

Commit87be73e

Browse files
committed
pg_upgrade: issue helpful error message for use on standbys
Commit777e6dd checked for a shut downmessage from a standby and allowed it to continue. This patch reports ahelpful error message in these cases, suggesting to use rsync asdocumented.Diagnosed-by: Martín MarquésDiscussion:https://postgr.es/m/CAPdiE1xYCow-reLjrhJ9DqrMu-ppNq0ChUUEvVdxhdjGRD5_eA@mail.gmail.comBackpatch-through: 9.3
1 parent86e873c commit87be73e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎src/bin/pg_upgrade/controldata.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,14 @@ get_control_data(ClusterInfo *cluster, bool live_check)
149149
/* remove leading spaces */
150150
while (*p==' ')
151151
p++;
152-
if (strcmp(p,"shut down\n")!=0&&
153-
strcmp(p,"shut down in recovery\n")!=0)
152+
if (strcmp(p,"shut down in recovery\n")==0)
153+
{
154+
if (cluster==&old_cluster)
155+
pg_fatal("The source cluster was shut down while in recovery mode. To upgrade, use \"rsync\" as documented or shut it down as a primary.\n");
156+
else
157+
pg_fatal("The target cluster was shut down while in recovery mode. To upgrade, use \"rsync\" as documented or shut it down as a primary.\n");
158+
}
159+
elseif (strcmp(p,"shut down\n")!=0)
154160
{
155161
if (cluster==&old_cluster)
156162
pg_fatal("The source cluster was not shut down cleanly.\n");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp