"Sergey E. Koposov" <math(at)sai(dot)msu(dot)ru> writes:
> I recently have seen the segfault with Postgres 8.1.4.
I'm betting that portal->sourceText has already been deallocated when
exec_execute_message tries to print the log message. Getting an actual
segfault from that would very probably be hard to reproduce, but if you
build with --enable-cassert it should not be too hard to reproduce
corruption of the log message, ie, display of garbage instead of
"ROLLBACK" as the command text. Please try that and see if you can
generate a self-contained test case.
regards, tom lane