Re: BUG #1502: hash_seq_search might return removed entry - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1502: hash_seq_search might return removed entry
Date
Msg-id 19661.1109175184@sss.pgh.pa.us
Whole thread Raw
In response to BUG #1502: hash_seq_search might return removed entry  ("Thomas" <thhal@mailblocks.com>)
Responses Re: BUG #1502: hash_seq_search might return removed entry  (Thomas Hallgren <thhal@mailblocks.com>)
List pgsql-bugs
"Thomas" <thhal@mailblocks.com> writes:
> The hash_seq_search keeps track of what element that it should return next
> in a HASH_SEQ_STATUS struct when it peruses a bucket. Removing that element
> from the table won't change anything since the struct remains unaffected. It
> still holds onto that element and hence, will return it on next iteration.

This isn't a bug; it's the designed way for it to work.  It's up to
callers to avoid causing a problem.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1500: child dead
Next
From: Richard Huxton
Date:
Subject: Re: BUG #1500: child dead