Re: snapshot too old, configured by time

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: snapshot too old, configured by time
Дата
Msg-id CAB7nPqS4X_nqZqW2CCdywWSLk+h_WQoenrwD_PcE9K8UeYUZdA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: snapshot too old, configured by time  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: snapshot too old, configured by time  (Kevin Grittner <kgrittn@gmail.com>)
Список pgsql-hackers
On Fri, Apr 1, 2016 at 11:45 PM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> Kevin Grittner wrote:
>
>> Attached is what I think you're talking about for the first patch.
>> AFAICS this should generate identical executable code to unpatched.
>> Then the patch to actually implement the feature would, instead
>> of adding 30-some lines with TestForOldSnapshot() would implement
>> that as the behavior for the other enum value, and alter those
>> 30-some BufferGetPage() calls.
>>
>> Álvaro and Michael, is this what you were looking for?
>
> Yes, this is what I was thinking, thanks.

A small thing:
$ git diff master --check
src/include/storage/bufmgr.h:181: trailing whitespace.
+#define BufferGetPage(buffer, snapshot, relation, agetest)
((Page)BufferGetBlock(buffer))

-   Page        page = BufferGetPage(buf);
+   Page        page = BufferGetPage(buf, NULL, NULL, BGP_NO_SNAPSHOT_TEST);
Having a BufferGetPageExtended() with some flags and a default
corresponding to NO_SNAPSHOT_TEST would reduce the diff impact. And as
long as the check is integrated with BufferGetPage[Extended]() I would
not complain, the patch as proposed being 174kB...
--
Michael



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Speed up Clog Access by increasing CLOG buffers
Следующее
От: David Rowley
Дата:
Сообщение: Re: Performance improvement for joins where outer side is unique