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

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi
Дата
Msg-id CAPpHfdtccjBnkfWj7Mms4BeAu=xW6vp-qp41M_fqY63vey=diw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi  (Peter Geoghegan <pg@bowt.ie>)
Ответы Re: pgsql: Skip full index scan during cleanup of B-tree indexes whenpossi  (Teodor Sigaev <teodor@sigaev.ru>)
Re: pgsql: Skip full index scan during cleanup of B-tree indexes whenpossi  (Teodor Sigaev <teodor@sigaev.ru>)
Список pgsql-committers
On Wed, Apr 18, 2018 at 9:21 PM, Peter Geoghegan <pg@bowt.ie> wrote:
On Wed, Apr 18, 2018 at 11:12 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
> On Thu, Apr 5, 2018 at 1:29 AM, Teodor Sigaev <teodor@sigaev.ru> wrote:
>> Skip full index scan during cleanup of B-tree indexes when possible
>
> This commit added XLOG_BTREE_META_CLEANUP, so btree_desc() and
> btree_identify() should be updated so that they handle XLOG_BTREE_META_CLEANUP.
> But ISTM that you forgot doing that.
 
Thank you for notice.  See attached bt-vacuum-cleanup-wal-record-desc-identify.patch fixing that.

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.

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

Вложения

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Improve error detection/reporting in Catalog.pm and genbki.pl.