OSDN Git Service

Merge branch 'pgrex90-base' into pgrex90
[pg-rex/syncrep.git] / src / backend / replication / libpqwalreceiver / libpqwalreceiver.c
index e4cee68..0d8c278 100644 (file)
@@ -160,7 +160,7 @@ libpqrcv_connect(char *conninfo, XLogRecPtr startpoint)
                         startpoint.xlogid, startpoint.xrecoff,
                         GetConfigOption("replication_mode", false));
        res = libpqrcv_PQexec(cmd);
-       if (PQresultStatus(res) != PGRES_COPY_OUT)
+       if (PQresultStatus(res) != PGRES_COPY_BOTH)
        {
                PQclear(res);
                ereport(ERROR,
@@ -306,6 +306,7 @@ libpqrcv_PQexec(const char *query)
 
                if (PQresultStatus(lastResult) == PGRES_COPY_IN ||
                        PQresultStatus(lastResult) == PGRES_COPY_OUT ||
+                       PQresultStatus(lastResult) == PGRES_COPY_BOTH ||
                        PQstatus(streamConn) == CONNECTION_BAD)
                        break;
        }