Skip site navigation (1) Skip section navigation (2)

Re: BUG #1502: hash_seq_search might return removed entry

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Thomas Hallgren <thhal(at)mailblocks(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1502: hash_seq_search might return removed entry
Date: 2005-02-24 21:33:19
Message-ID: 200502242133.j1OLXJV15575@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Thomas Hallgren wrote:
> Tom Lane wrote:
> 
> >"Thomas" <thhal(at)mailblocks(dot)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.
> >  
> >
> This report origins from the hackers thread "SPI_finish and 
> RegisterExprContextCallback" where you indicated that my report did not 
> properly describe a problem. Since my report was correct and since you 
> stated that "hash_seq_search() shouldn't return any already-dropped 
> entries." I was led me to believe that it was *not* designed to do that.
> 
> Anyway, the AtCommit_Portals doesn't avoid this problem and the end 
> result for me is the same regardless of where the error is. I can't drop 
> portals using a ExprContextCallback and I'd like to know the best way to 
> fix it. I can contribute a patch but I want you to decide what needs to 
> be fixed.

Does this need a C comment addition?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2005-02-24 23:04:13
Subject: Re: BUG #1504: Wrong user is used for sequences through rules
Previous:From: Barry BrownDate: 2005-02-24 14:19:01
Subject: Re: BUG #1497: Default permissions allow any user to create objects in any database

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group