Re: Strange \copy failure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Steve Woodcock <swoodcock(at)scholastic(dot)co(dot)uk>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Strange \copy failure
Date: 2001-06-21 03:12:46
Message-ID: 11836.993093166@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Steve Woodcock <swoodcock(at)scholastic(dot)co(dot)uk> writes:
> This is on postgresql 7.0.2, RH6.2.
> I'm doing a \copy from psql of a 2035 line file, and the backend is
> hanging (no CPU being used). Control-C doesn't cancel the command and
> I have to Control-Z and 'kill %p' to get psql to terminate. The
> interesting thing is that if I chop the input file in half, it
> works. I can \copy the first half, and \copy the second half. Even
> more interesting, if I take the first 2000 lines of the file it works,
> and if I take the last 2000 lines of the file it works. This is a 2035
> line file, so it makes me thing there isn't anything wrong with the
> data in it.

That is strange. Try attaching to the hung backend with gdb and getting
a backtrace, viz:

gdb /path/to/postgres-executable
gdb> attach PID-of-backend-process
gdb> bt
gdb> quit

Might also be a good idea to do similarly for the psql process, in case
that's where the problem is.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message 楊 慧泉 2001-06-21 05:45:59 about createdb err
Previous Message Rainer Mager 2001-06-20 23:21:32 RE: Memory leak in 7.0.3 JDBC driver