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 11:29:38 +0300
Message-ID: <7152e7dd-4448-8e9b-1e28-8139035a1fd4@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>

Thank you, both patches are pushed.

Alexander Korotkov wrote:
> On Wed, Apr 18, 2018 at 9:21 PM, Peter Geoghegan <pg@bowt.ie 
> <mailto:pg@bowt.ie>> wrote:
> 
>     On Wed, Apr 18, 2018 at 11:12 AM, Fujii Masao <masao.fujii@gmail.com
>     <mailto:masao.fujii@gmail.com>> wrote:
>     > On Thu, Apr 5, 2018 at 1:29 AM, Teodor Sigaev <teodor@sigaev.ru <mailto: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 <http://www.postgrespro.com/;
> The Russian Postgres Company
> 

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




view thread (18+ messages)

Message-ID: <7152e7dd-4448-8e9b-1e28-8139035a1fd4@sigaev.ru>
Permalink:  ../7152e7dd-4448-8e9b-1e28-8139035a1fd4@sigaev.ru/
Also on:    postgresql.org/message-id/7152e7dd-4448-8e9b-1e28-8139035a1fd4@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: <7152e7dd-4448-8e9b-1e28-8139035a1fd4@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> <7152e7dd-4448-8e9b-1e28-8139035a1fd4@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