Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Peter Geoghegan <pg(at)bowt(dot)ie>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi
Date: 2018-04-19 07:44:13
Message-ID: CAPpHfdtOBG697zHRosd48x-OFsXa+vejiBy2Tgx_s4MgRQ1cpg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Thu, Apr 19, 2018 at 9:19 AM, Teodor Sigaev <teodor(at)sigaev(dot)ru> wrote:

> Another thing that I noticed is that the metapage stores
>> btm_last_cleanup_num_heap_tuples as a float4, even though
>> xl_btree_metadata stores it as a double. I suggest that both places
>> store it as float8, to be consistent. (It should not be double because
>> we always avoid using anything other types with explicit typedef'd
>> widths in WAL records.)
>>
>>
>> Good catch, thank you! I also agree that both these fields should be of
>> float8 type.
>> Please, find attached bt-vacuum-cleanup-float8-num-heap-tuples.patch
>> fixing that.
>>
>
> Hm. patch changes on-disk representation of btree meta page. And there is
> no support to upgrade meta page since 857f9c36 commit (and should not,
> because that versions wasn't relesead), to prevent possible false positive
> bug reports I suggest to bump catversion. Objections?

I agree, catversion should be bumped for this patch.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Teodor Sigaev 2018-04-19 08:09:16 pgsql: Adjust _bt_insertonpg() comments
Previous Message Teodor Sigaev 2018-04-19 06:28:20 pgsql: Handle XLOG_BTREE_META_CLEANUP in btree_desc() and btree_identif