Dropped connection during COPY causes trouble

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Dropped connection during COPY causes trouble
Дата
Msg-id 2969.932604301@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: [BUGS] Dropped connection during COPY causes trouble  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-bugs
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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Unprivileged user
Дата:
Сообщение: General Bug Report: This message appears "malloc: cannot allocate memory"
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [BUGS] Dropped connection during COPY causes trouble