diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-04-16 01:46:57 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-04-16 01:46:57 +0000 |
commit | 6ccb2af7251a203d196d973f2d0135e3e4e7b452 (patch) | |
tree | 640cacf16ee8822915863619ab2d85eb26842bc7 /src | |
parent | c8e05affe41f08626422501510cdb4b3f08468c1 (diff) | |
download | postgresql-6ccb2af7251a203d196d973f2d0135e3e4e7b452.tar.gz postgresql-6ccb2af7251a203d196d973f2d0135e3e4e7b452.zip |
Remove error report from pq_endmessage when pq_putmessage fails. The
only possible failure is in pq_flush, which will log a (better!) report
anyway --- so pq_endmessage is just cluttering the log with a redundant
entry. This matters when a client crashes partway through a large query,
since we will emit many broken-pipe reports before finishing the query
and exiting.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/libpq/pqformat.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/backend/libpq/pqformat.c b/src/backend/libpq/pqformat.c index a9a9114490e..6719017c6d1 100644 --- a/src/backend/libpq/pqformat.c +++ b/src/backend/libpq/pqformat.c @@ -16,7 +16,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pqformat.c,v 1.16 2001/01/24 19:42:56 momjian Exp $ + * $Id: pqformat.c,v 1.17 2001/04/16 01:46:57 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -213,13 +213,8 @@ pq_sendint(StringInfo buf, int i, int b) void pq_endmessage(StringInfo buf) { - if (pq_putmessage('\0', buf->data, buf->len)) - { - snprintf(PQerrormsg, PQERRORMSG_LENGTH, - "FATAL: pq_endmessage failed: errno=%d\n", errno); - fputs(PQerrormsg, stderr); - pqdebug("%s", PQerrormsg); - } + (void) pq_putmessage('\0', buf->data, buf->len); + /* no need to complain about any failure, since pqcomm.c already did */ pfree(buf->data); buf->data = NULL; } |