Oleg Bartunov <oleg@sai.msu.su> writes:
>> Can you provide a backtrace?
> Will try to reproduce crash,. How do I can debug psql ?
There should be a core file left in the database subdirectory, eg
/usr/local/pgsql/data/base/DB/core
where DB represents the name of the database you used.
As the postgres user, do this (with appropriate pathname changes of course)
gdb /usr/local/pgsql/bin/postgres /usr/local/pgsql/data/base/DB/core
and when you get the (gdb) prompt, enter "bt" for backtrace. You should
get a few dozen lines of printout, more or less like this:
(gdb) bt
#0 AllocSetAlloc (set=0x40254600, size=1076446936) at aset.c:267
#1 0x169314 in PortalHeapMemoryAlloc (this=0x40254600, size=36) at portalmem.c:264
#2 0x168bb4 in MemoryContextAlloc (context=0x4007d940, size=36) at mcxt.c:230
#3 0xe4d88 in newNode (size=36, tag=T_Resdom) at nodes.c:41
#4 0xea92c in makeResdom (resno=17920, restype=23, restypmod=-1, resname=0x0, reskey=0, reskeyop=0, resjunk=0) at
makefuncs.c:102
#5 0x101448 in create_tl_element (var=0x402402e0, resdomno=36) at tlist.c:135
#6 0xf689c in new_join_tlist (tlist=0x40254600, first_resdomno=36) at joinrels.c:286 ...
The "q" command will get you out of gdb after you've copied and pasted
this info.
BTW, if you did not build the backend with "-g" included in CFLAGS, you
will get a much less complete backtrace ... but it may still tell us
something of use.
regards, tom lane