postmaster crashing the server in 7.0.2

Started by Travis Baueralmost 26 years ago2 messagesgeneral
Jump to latest
#1Travis Bauer
trbauer@indiana.edu

Sometimes when I send an sql command to postmaster from a trigger written
in c, the postmaster starts to eat up an all the processor time, and it
becomes necessary to phycially turn off the server. I can execute the
same command from a script, or within psql and it works fine.

I suspect it has to do with the lenght of the sql statement. Is there a
limit to the length of a sql statement that you can send using a c
function?

----------------------------------------------------------------
Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer
----------------------------------------------------------------

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Travis Bauer (#1)
Re: postmaster crashing the server in 7.0.2

Travis Bauer <trbauer@indiana.edu> writes:

Sometimes when I send an sql command to postmaster from a trigger written
in c, the postmaster starts to eat up an all the processor time, and it
becomes necessary to phycially turn off the server. I can execute the
same command from a script, or within psql and it works fine.

I suspect it has to do with the lenght of the sql statement.

I doubt it. I think you're running into some other sort of bug;
or, quite possibly, there's something wrong with your C code.
Next time it happens, could you attach to the busy process with gdb
and get a backtrace? As postgres user,
gdb /path/to/postgres/executable
attach PID-of-looping-backend
bt
It would help if you've compiled the backend with -g beforehand.

regards, tom lane