Hi,
On Tue, 01 Jan 2013 15:56:50 +0100, I wrote:
> It looks like fcinfo (amongst other things) is allocated in a child of
> the SPI context. My speculation is that the SPI context gets reset by
> AtEOSubXact_SPI(), thus resetting the memory fcinfo points to, leading
> to SIGSEGV.
Indeed, that looks to be the case. If I change the bottom part of
AtEOSubXact_SPI() a bit:
- if (_SPI_current && !isCommit)
+ if (_SPI_current && _SPI_current->connectSubid == mySubid &&
!isCommit)
the problem goes away.
I'm puzzled as to why AtEOSubXact_SPI() needs to unconditionally clear the
surround SPI context, or why it assumes it's a good idea.
Regards,
Marko Tiikkaja