summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/libpq/fe-misc.c')
-rw-r--r--src/interfaces/libpq/fe-misc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c
index 488841e1e6b..31f93bba327 100644
--- a/src/interfaces/libpq/fe-misc.c
+++ b/src/interfaces/libpq/fe-misc.c
@@ -814,7 +814,8 @@ definitelyEOF:
/* Come here if lower-level code already set a suitable errorMessage */
definitelyFailed:
- pqDropConnection(conn);
+ /* Do *not* drop any already-read data; caller still wants it */
+ pqDropConnection(conn, false);
conn->status = CONNECTION_BAD; /* No more connection to backend */
return -1;
}