pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Teodor Sigaev <teodor@sigaev.ru>
To: Alexander Korotkov <a.korotkov@postgrespro.ru>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Fujii Masao <masao.fujii@gmail.com>
Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>
Subject: Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi
Date: Thu, 19 Apr 2018 09:19:38 +0300
Message-ID: <b8b92fda-e1b1-ba23-fca8-578a34a5e7f2@sigaev.ru> (raw)
In-Reply-To: <CAPpHfdtccjBnkfWj7Mms4BeAu=xW6vp-qp41M_fqY63vey=diw@mail.gmail.com>
References: <E1f3lIH-0005Cn-GV@gemulon.postgresql.org>
	<CAHGQGwGxAt+dTfDuzBJSC1tMDefDr1WLa=yGf1h0ncJ55-eXDQ@mail.gmail.com>
	<CAH2-WzkO5NA-UoFRfL3vf-1fP=_zFY1wDdDq1tNx4o89uoATQw@mail.gmail.com>
	<CAPpHfdtccjBnkfWj7Mms4BeAu=xW6vp-qp41M_fqY63vey=diw@mail.gmail.com>

>     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?


-- 
Teodor Sigaev                      E-mail: teodor@sigaev.ru
                                       WWW: http://www.sigaev.ru/




view thread (18+ messages)  latest in thread

Message-ID: <b8b92fda-e1b1-ba23-fca8-578a34a5e7f2@sigaev.ru>
Permalink:  ../b8b92fda-e1b1-ba23-fca8-578a34a5e7f2@sigaev.ru/
Also on:    postgresql.org/message-id/b8b92fda-e1b1-ba23-fca8-578a34a5e7f2@sigaev.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: teodor@sigaev.ru, a.korotkov@postgrespro.ru, pg@bowt.ie, masao.fujii@gmail.com
  Subject: Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi
  In-Reply-To: <b8b92fda-e1b1-ba23-fca8-578a34a5e7f2@sigaev.ru>
  References: <E1f3lIH-0005Cn-GV@gemulon.postgresql.org> <CAHGQGwGxAt+dTfDuzBJSC1tMDefDr1WLa=yGf1h0ncJ55-eXDQ@mail.gmail.com> <CAH2-WzkO5NA-UoFRfL3vf-1fP=_zFY1wDdDq1tNx4o89uoATQw@mail.gmail.com> <CAPpHfdtccjBnkfWj7Mms4BeAu=xW6vp-qp41M_fqY63vey=diw@mail.gmail.com> <b8b92fda-e1b1-ba23-fca8-578a34a5e7f2@sigaev.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox