aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-09-26 00:26:28 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-09-26 00:26:28 +0000
commit09a893117a9fe0ae5e7e5c6a6a5496e9e6826f4c (patch)
tree9398c11bf08ce809aec6f2b004a6b39529b1679a /src/backend/tcop/postgres.c
parent26b5d5317bdbe8574abc00acb68613ff7e194e3a (diff)
downloadpostgresql-09a893117a9fe0ae5e7e5c6a6a5496e9e6826f4c.tar.gz
postgresql-09a893117a9fe0ae5e7e5c6a6a5496e9e6826f4c.zip
Repair bug that would allow libpq to think a command had succeeded when
it really hadn't, due to double output of previous command's response. Fix prevents recursive entry to libpq routines. Found by Jan Wieck.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 85fcc49c839..5658e10d453 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.432 2004/09/13 20:07:05 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.433 2004/09/26 00:26:25 tgl Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@@ -2811,6 +2811,9 @@ PostgresMain(int argc, char *argv[], const char *username)
DisableNotifyInterrupt();
DisableCatchupInterrupt();
+ /* Make sure libpq is in a good state */
+ pq_comm_reset();
+
/* Report the error to the client and/or server log */
EmitErrorReport();