Re: snapshot too old, configured by time

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: snapshot too old, configured by time
Дата
Msg-id 20160330202623.GA2882@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: snapshot too old, configured by time  (Kevin Grittner <kgrittn@gmail.com>)
Ответы Re: snapshot too old, configured by time  (Kevin Grittner <kgrittn@gmail.com>)
Список pgsql-hackers
Kevin Grittner wrote:
> On Wed, Mar 30, 2016 at 2:22 PM, Alvaro Herrera
> <alvherre@2ndquadrant.com> wrote:

> > I said that we should change BufferGetPage into having the snapshot
> > check built-in, except in the cases where a flag is passed; and the flag
> > would be passed in all cases except those 30-something you identified.
> > In other words, the behavior in all the current callsites would be
> > identical to what's there today; we could have a macro do the first
> > check so that we don't introduce the overhead of a function call in the
> > 450 cases where it's not needed.
> 
> In many of the places that BufferGetPage is called there is not a
> snapshot available.  I assume that you would be OK with an Assert
> that the flag was passed if the snapshot is NULL?

Sure, that's fine.

BTW I said "a macro" but I was forgetting that we have static inline
functions in headers now, which means you can avoid the horrors of
actually writing a macro.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: large regression for parallel COPY
Следующее
От: Kevin Grittner
Дата:
Сообщение: Re: snapshot too old, configured by time