Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index
Дата
Msg-id 4bba2c6b-b064-62c9-eca9-611072bea206@iki.fi
обсуждение исходный текст
Ответ на Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-hackers
On 06/21/2017 10:41 AM, Heikki Linnakangas wrote:
> On 06/16/2017 01:24 PM, Shubham Barai wrote:
>> @@ -497,6 +499,13 @@ gistplacetopage(Relation rel, Size freespace, GISTSTATE *giststate,
>>              for (ptr = dist->next; ptr; ptr = ptr->next)
>>                  UnlockReleaseBuffer(ptr->buffer);
>>          }
>> +
>> +        for (ptr = dist; ptr; ptr = ptr->next)
>> +            PredicateLockPageSplit(rel,
>> +                        BufferGetBlockNumber(buffer),
>> +                        BufferGetBlockNumber(ptr->buffer));
>> +
>> +
>
> I think this new code needs to go before the UnlockReleaseBuffer() calls
> above. Calling BufferGetBlockNumber() on an already-released buffer is
> not cool.

.. and that's exactly what you fixed in your updated patch. Sorry for 
the noise :-)

- Heikki




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index
Следующее
От: Mahendranath Gurram
Дата:
Сообщение: Re: [HACKERS] Regarding Postgres Dynamic Shared Memory (DSA)