Steve Woodcock <swoodcock@scholastic.co.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