/* remove leading spaces */
while (*p == ' ')
p++;
- if (strcmp(p, "shut down\n") != 0 &&
- strcmp(p, "shut down in recovery\n") != 0)
+ if (strcmp(p, "shut down in recovery\n") == 0)
+ {
+ if (cluster == &old_cluster)
+ 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");
+ else
+ 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");
+ }
+ else if (strcmp(p, "shut down\n") != 0)
{
if (cluster == &old_cluster)
pg_fatal("The source cluster was not shut down cleanly.\n");