Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6ccb2af

Browse files
committed
Remove error report from pq_endmessage when pq_putmessage fails. The
only possible failure is in pq_flush, which will log a (better!) reportanyway --- so pq_endmessage is just cluttering the log with a redundantentry. This matters when a client crashes partway through a large query,since we will emit many broken-pipe reports before finishing the queryand exiting.
1 parentc8e05af commit6ccb2af

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

‎src/backend/libpq/pqformat.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
1717
* Portions Copyright (c) 1994, Regents of the University of California
1818
*
19-
*$Id: pqformat.c,v 1.16 2001/01/24 19:42:56 momjian Exp $
19+
*$Id: pqformat.c,v 1.17 2001/04/16 01:46:57 tgl Exp $
2020
*
2121
*-------------------------------------------------------------------------
2222
*/
@@ -213,13 +213,8 @@ pq_sendint(StringInfo buf, int i, int b)
213213
void
214214
pq_endmessage(StringInfobuf)
215215
{
216-
if (pq_putmessage('\0',buf->data,buf->len))
217-
{
218-
snprintf(PQerrormsg,PQERRORMSG_LENGTH,
219-
"FATAL: pq_endmessage failed: errno=%d\n",errno);
220-
fputs(PQerrormsg,stderr);
221-
pqdebug("%s",PQerrormsg);
222-
}
216+
(void)pq_putmessage('\0',buf->data,buf->len);
217+
/* no need to complain about any failure, since pqcomm.c already did */
223218
pfree(buf->data);
224219
buf->data=NULL;
225220
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp