Re: Can't terminate hung COPY

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Rees <drees76(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Can't terminate hung COPY
Date: 2013-03-20 21:45:09
Message-ID: 21170.1363815909@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Rees <drees76(at)gmail(dot)com> writes:
> On Wed, Mar 20, 2013 at 12:37 PM, David Rees <drees76(at)gmail(dot)com> wrote:
>> PostgreSQL 8.4.16 on CentOS 5.9.
>>
>> I've run into a situation where executing a \COPY from psql will hang
>> and at that point it's impossible to terminate the COPY command.

> Some additional notes:

> Running psql on the same LAN for some reason works fine with the same
> COPY file. On a remote network it hangs.

That seems to point the finger at the network stack: what is probably
happening is it's failing to abort a recv() or send() when the process
receives a signal. You might see if you can confirm that diagnosis,
perhaps by watching the backend process with strace, or by attaching to
it after the fact with gdb and seeing where the stack trace leads.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Orlitzky 2013-03-20 22:26:32 Re: State of the art re: group default privileges
Previous Message Daniel Cristian Cruz 2013-03-20 21:36:23 Bad plan on a huge table query