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