diff options
Diffstat (limited to 'src/interfaces/libpq/fe-protocol3.c')
-rw-r--r-- | src/interfaces/libpq/fe-protocol3.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c index c605bcd734c..e8f3f337b1a 100644 --- a/src/interfaces/libpq/fe-protocol3.c +++ b/src/interfaces/libpq/fe-protocol3.c @@ -1484,7 +1484,12 @@ pqGetCopyData3(PGconn *conn, char **buffer, int async) * expect the state was already changed. */ if (msgLength == -1) - conn->asyncStatus = PGASYNC_BUSY; + { + if (conn->asyncStatus == PGASYNC_COPY_BOTH) + conn->asyncStatus = PGASYNC_COPY_IN; + else + conn->asyncStatus = PGASYNC_BUSY; + } return msgLength; /* end-of-copy or error */ } if (msgLength == 0) |