Re: SPI_finish and RegisterExprContextCallback - Mailing list pgsql-hackers

From Thomas Hallgren
Subject Re: SPI_finish and RegisterExprContextCallback
Date
Msg-id thhal-0eqjyAqWsxicN+zUpc/NneTcsA1CNrd@mailblocks.com
Whole thread Raw
In response to Re: SPI_finish and RegisterExprContextCallback  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:

>The comment for AtCommit_Portals points out that there are risks of this
>sort, but I don't think you've described it properly.  The
>SPI_cursor_close operation is probably failing not succeeding, because
>AtCommit_Portals will never find an already-deleted portal ---
>hash_seq_search() shouldn't return any already-dropped entries.
>  
>
The hash_seq_search keeps track of what element that it should return 
next when it peruses a bucket. Removing that element from the table 
won't change anything since the HASH_SEQ_STATUS remains unaffected. It 
still holds onto that element and hence, will return it on next iteration.

This should be considered a bug I think.

Regards,
Thomas Hallgren




pgsql-hackers by date:

Previous
From: Manuel Sugawara
Date:
Subject: problems with locale settings
Next
From: pgsql@mohawksoft.com
Date:
Subject: Re: Data loss, vacuum, transaction wrap-around