Re: [HACKERS] _hash_addovflpage has a bug - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] _hash_addovflpage has a bug
Date
Msg-id CA+TgmoY=hZb9jBpH8HByiNqdALNQoODYypc=NU095xMck5-=qw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] _hash_addovflpage has a bug  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Mon, Jan 9, 2017 at 10:46 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> Yeah, we can write code that way, but then it is better to rely just
> on retain_pin variable in the function and add an Assert for bucket
> page whenever we are retaining pin.  How about doing something like
> attached patch?

Committed.

>>  Not sure exactly how that
>> works out in terms of locking.
>
> We have to change the locking order as mentioned above by me.  This
> change is already present in that patch, so maybe we add the check as
> suggested by you along with that patch.  Now, another thing we could
> do is to extract those changes from WAL patch, but I am not sure if it
> is worth the effort.

I'm not sure at this point, either.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] merging some features from plpgsql2 project
Next
From: Jesper Pedersen
Date:
Subject: Re: [HACKERS] Microvacuum support for Hash Index