Search Postgresql Archives

Re: Recovering from an exception

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux