pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
8.4: COPY continues after client disconnects
2+ messages / 2 participants
[nested] [flat]

* 8.4: COPY continues after client disconnects
@ 2013-03-01 15:15 Jon Nelson <jnelson+pgsql@jamponi.net>
  2013-03-08 11:04 ` Re: 8.4: COPY continues after client disconnects Heikki Linnakangas <hlinnakangas@vmware.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Jon Nelson @ 2013-03-01 15:15 UTC (permalink / raw)
  To: pgsql-bugs

Using PostgreSQL 8.4.13 on ScientificLinux 6.3 (x86_64), I noticed
that a pg_dump ran out of (local) disk space.
However, the server was still using CPU and disk resources.  An strace
clearly showed this pattern:

read(....) = 8192
sendto(...) = -1 EPIPE
-- SIGPIPE (Broken pipe) @ ....

The server does detect the broken pipe. It logs the following messages:

637 LOG:  08006: could not send data to client: Connection reset by peer
638 LOCATION:  internal_flush, pqcomm.c:1108
639 STATEMENT:  COPY ... to stdout;
640 LOG:  08006: could not send data to client: Broken pipe
641 LOCATION:  internal_flush, pqcomm.c:1108
642 STATEMENT:  COPY ... to stdout;


it ran until I killed it.


-- 
Jon


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: 8.4: COPY continues after client disconnects
  2013-03-01 15:15 8.4: COPY continues after client disconnects Jon Nelson <jnelson+pgsql@jamponi.net>
@ 2013-03-08 11:04 ` Heikki Linnakangas <hlinnakangas@vmware.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Heikki Linnakangas @ 2013-03-08 11:04 UTC (permalink / raw)
  To: Jon Nelson <jnelson+pgsql@jamponi.net>; +Cc: pgsql-bugs

On 01.03.2013 17:15, Jon Nelson wrote:
> Using PostgreSQL 8.4.13 on ScientificLinux 6.3 (x86_64), I noticed
> that a pg_dump ran out of (local) disk space.
> However, the server was still using CPU and disk resources.  An strace
> clearly showed this pattern:
>
> read(....) = 8192
> sendto(...) = -1 EPIPE
> -- SIGPIPE (Broken pipe) @ ....
>
> The server does detect the broken pipe. It logs the following messages:
>
> 637 LOG:  08006: could not send data to client: Connection reset by peer
> 638 LOCATION:  internal_flush, pqcomm.c:1108
> 639 STATEMENT:  COPY ... to stdout;
> 640 LOG:  08006: could not send data to client: Broken pipe
> 641 LOCATION:  internal_flush, pqcomm.c:1108
> 642 STATEMENT:  COPY ... to stdout;

This was fixed in version 9.2. Per release notes:

>     Cancel the running query if the client gets disconnected (Florian Pflug)
>
>     If the backend detects loss of client connection during a query, it will now cancel the query rather than attempting to finish it.

COPY counts as a "running query".

-- 
- Heikki


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2013-03-08 11:04 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-03-01 15:15 8.4: COPY continues after client disconnects Jon Nelson <jnelson+pgsql@jamponi.net>
2013-03-08 11:04 ` Heikki Linnakangas <hlinnakangas@vmware.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox