diff options
author | Magnus Hagander <magnus@hagander.net> | 2012-05-07 18:39:37 +0200 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2012-05-07 18:50:44 +0200 |
commit | 916d589a10185bb30fc77923029d806f5907ab1e (patch) | |
tree | 157ab4ed8ab1558e1b9c753c7b69c2d4aee9ffd7 /src/backend/commands/copy.c | |
parent | 65b110703b798cdbfa568aa3583caba0ed51b33a (diff) | |
download | postgresql-916d589a10185bb30fc77923029d806f5907ab1e.tar.gz postgresql-916d589a10185bb30fc77923029d806f5907ab1e.zip |
Make "unexpected EOF" messages DEBUG1 unless in an open transaction
"Unexpected EOF on client connection" without an open transaction
is mostly noise, so turn it into DEBUG1. With an open transaction it's
still indicating a problem, so keep those as ERROR, and change the message
to indicate that it happened in a transaction.
Diffstat (limited to 'src/backend/commands/copy.c')
-rw-r--r-- | src/backend/commands/copy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 15f43fd3d6a..1d1eacd3fbd 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -547,7 +547,7 @@ CopyGetData(CopyState cstate, void *databuf, int minread, int maxread) /* Only a \. terminator is legal EOF in old protocol */ ereport(ERROR, (errcode(ERRCODE_CONNECTION_FAILURE), - errmsg("unexpected EOF on client connection"))); + errmsg("unexpected EOF on client connection with an open transaction"))); } bytesread = minread; break; @@ -566,11 +566,11 @@ CopyGetData(CopyState cstate, void *databuf, int minread, int maxread) if (mtype == EOF) ereport(ERROR, (errcode(ERRCODE_CONNECTION_FAILURE), - errmsg("unexpected EOF on client connection"))); + errmsg("unexpected EOF on client connection with an open transaction"))); if (pq_getmessage(cstate->fe_msgbuf, 0)) ereport(ERROR, (errcode(ERRCODE_CONNECTION_FAILURE), - errmsg("unexpected EOF on client connection"))); + errmsg("unexpected EOF on client connection with an open transaction"))); switch (mtype) { case 'd': /* CopyData */ |