Re: SPI_finish and RegisterExprContextCallback - Mailing list pgsql-hackers

From Thomas Hallgren
Subject Re: SPI_finish and RegisterExprContextCallback
Date
Msg-id thhal-0mhfyAs2qxicY+3IQMzjEfEnI4wqS5a@mailblocks.com
Whole thread Raw
In response to SPI_finish and RegisterExprContextCallback  (Thomas Hallgren <thhal@mailblocks.com>)
List pgsql-hackers
I found another piece of information that might be of interest. This is 
related to nested calls and the ExprContextCallback but not related to 
nested active cursors.

AtCommitPortals (portalmem.c)  iterates over the entries in the 
PortalHashTable. This causes a chain of calls that sometimes reach an 
ExprContextCallback. If that callback issues a succesfull 
SPI_cursor_close some problems might lay ahead. As the AcCommitPortals 
iteration continues, it sometimes encounter a deleted portal and elogs 
with an error stating "trying to delete portal name that does not exist".

Regards,
Thomas Hallgren




pgsql-hackers by date:

Previous
From: "Dave Page"
Date:
Subject: Re: Get rid of system attributes in pg_attribute?
Next
From: Russell Smith
Date:
Subject: Re: Data loss, vacuum, transaction wrap-around