Skip site navigation (1) Skip section navigation (2)

Dropped connection during COPY causes trouble

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Dropped connection during COPY causes trouble
Date: 1999-07-22 00:45:01
Message-ID: 2969.932604301@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
Don't kill a psql client that's in the middle of a COPY IN operation.

With current sources, the connected backend fails to quit, but instead
goes into an infinite loop writing
pq_recvbuf: unexpected EOF on client connection
to stderr over and over.

If you have postmaster stderr directed to a disk file, as I believe
is standard procedure, by and by the disk the postmaster logfile
is on fills up, and people start getting very unhappy...

I assume this is fairly easily fixed, but do not have a fix right this
instant.  It's probably my fault though --- I suppose it is an artifact
of the changes I made a couple months ago to prevent NOTICE messages
from coming out at inopportune times.  (If the bug were in pre-6.5
releases I'm sure we'd have heard about it before.)

Will produce a back-patch for 6.5 when I have it, but wanted to give
people a heads-up now.  Most embarrassing.

BTW, it occurs to me that the system ought to have provisions for
limiting the size of the logfile, rotating logfiles from time to
time, etc ... right now you cannot do those things easily except
by restarting the postmaster :-(.  Even without this bug, a determined
attacker could create a DOS attack by doing EXPLAIN VERBOSE enough
times to run the postmaster logfile up to full disk.  Bruce, I think
we need another TODO item:
  * prevent postmaster logfile from growing without bound

			regards, tom lane

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1999-07-22 01:08:41
Subject: Re: [BUGS] Dropped connection during COPY causes trouble
Previous:From: Peter MountDate: 1999-07-21 22:17:36
Subject: Email to me

pgsql-bugs by date

Next:From: Bruce MomjianDate: 1999-07-22 01:08:41
Subject: Re: [BUGS] Dropped connection during COPY causes trouble
Previous:From: Unprivileged userDate: 1999-07-21 16:58:01
Subject: General Bug Report: This message appears "malloc: cannot allocate memory"

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group