Commit
244142d32afd02e7408a2ef1f249b00393983822 only tested for the
pg_controldata output for primary servers, but standby servers have
different "Database cluster state" output, so check for that too.
Diagnosed-by: Michael Paquier
Discussion: https://postgr.es/m/
20180810164240.GM13638@paquier.xyz
Backpatch-through: 9.3
/* remove leading spaces */
while (*p == ' ')
p++;
- if (strcmp(p, "shut down\n") != 0)
+ if (strcmp(p, "shut down\n") != 0 &&
+ strcmp(p, "shut down in recovery\n") != 0)
{
if (cluster == &old_cluster)
pg_fatal("The source cluster was not shut down cleanly.\n");