Re: [HACKERS] Setting pd_lower in GIN metapage

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] Setting pd_lower in GIN metapage
Дата
Msg-id CAB7nPqQN1Gy7Z5sfqm=i0ZhE1NkDN=O=QjEqQmG5E8TFE83PuA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Setting pd_lower in GIN metapage  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Ответы Re: [HACKERS] Setting pd_lower in GIN metapage  (Masahiko Sawada <sawada.mshk@gmail.com>)
Re: [HACKERS] Setting pd_lower in GIN metapage  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-hackers
On Fri, Jun 23, 2017 at 11:17 AM, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
> That was it, thanks for the pointer.

GinInitMetabuffer() sets up pd_lower and pd_upper anyway using
PageInit so the check of PageIsVerified is guaranteed to work in any
case. Upgraded pages will still have their pd_lower set to the
previous values, and new pages will have the optimization. So this
patch is actually harmless for past pages, while newer ones are seen
as more compressible.

> Attached updated patch, which I confirmed, passes wal_consistency_check = gin.

I have spent some time looking at this patch, playing with pg_upgrade
to check the state of the page upgraded. And this looks good to me.
One thing that I noticed is that this optimization could as well
happen for spgist meta pages. What do others think?
-- 
Michael



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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: [HACKERS] Timing-sensitive case in src/test/recovery TAP tests
Следующее
От: Tom Lane
Дата:
Сообщение: [HACKERS] Corner-case error in pgstats file loading