From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: "unexpected EOF" messages |
Date: | 2012-05-07 17:18:03 |
Message-ID: | CA+TgmoaZ7D2_U1Z8Vyd+ef9fGOG-YBQRaascBNSM_biyrZ_A5Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, May 7, 2012 at 12:39 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> Makes sense, will change and commit.
Since the following hunk is repeated 3x, maybe it should be stuffed
into a function that is then called in three places:
+ if (IsTransactionState())
+ ereport(COMMERROR,
+ (errcode(ERRCODE_CONNECTION_FAILURE),
+ errmsg("unexpected EOF on
client connection with an open transaction")));
+ else
+ {
+ /*
+ * Can't send DEBUG log messages to client at
this point.
+ * Since we're disconnecting right away, we
don't need to
+ * restore whereToSendOutput.
+ */
+ whereToSendOutput = DestNone;
+ ereport(DEBUG1,
+
(errcode(ERRCODE_CONNECTION_DOES_NOT_EXIST),
+ errmsg("unexpected EOF on
client connection")));
+ }
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2012-05-07 17:20:46 | Re: "unexpected EOF" messages |
Previous Message | Tom Lane | 2012-05-07 17:09:23 | Re: Latch for the WAL writer - further reducing idle wake-ups. |