"Ian Harding" <ianh@tpchd.org> writes:
> (gdb) bt
> #0 0x48235ba4 in __divdi3 ()
> #1 0x48235f38 in free ()
> #2 0x4822b0f8 in fclose ()
> #3 0x481b0a67 in history_end ()
> #4 0x481b0e3d in history ()
> #5 0x481af258 in write_history ()
> #6 0x804e3cf in finishInput ()
> #7 0x48227930 in exit ()
> #8 0x804a35b in ___start ()
Hmm. Core dump inside libreadline's exit-cleanup routine, evidently.
I bet if you run psql with the -n switch, you don't see any problem?
Of course you won't have any command history either, so this isn't much
of an answer.
We have seen previous reports of weird misbehavior involving
libreadline, though mostly on Solaris IIRC. I'd suggest making sure you
have the most up-to-date libreadline, and perhaps recompile both that
and psql from source.
regards, tom lane