I wrote:
> Another point worth making is that this version of the patch deletes the
> tuple tables during AtEOSubXact_SPI(), earlier in cleanup than would
> happen with the prior version.  That increases the risk that external
> code might try to delete an already-deleted tuple table, if it tries
> to call SPI_freetuptable() during subxact cleanup.  The new code won't
> crash, although come to think of it it will probably throw an error
> because you're not connected anymore.  (Maybe this is a reason to not
> insist on being connected, but just silently search whatever the top
> stack context is?)

After further reflection I think that's the prudent way to do it, so
I've adjusted SPI_freetuptable to not insist on being connected.
Pushed with that change:
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=3d13623d75d3206c8f009353415043a191ebab39

                        regards, tom lane


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

Reply via email to