Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f92v5-00030Y-NP for pgsql-committers@arkaria.postgresql.org; Thu, 19 Apr 2018 06:19:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f92v4-0004yR-25 for pgsql-committers@arkaria.postgresql.org; Thu, 19 Apr 2018 06:19:46 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f92v3-0004yI-Pg for pgsql-committers@lists.postgresql.org; Thu, 19 Apr 2018 06:19:45 +0000 Received: from hook.sigaev.ru ([93.180.27.50]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f92v0-0002Bt-Cd for pgsql-committers@lists.postgresql.org; Thu, 19 Apr 2018 06:19:44 +0000 Received: from zorg.sigaev.ru (95-25-145-167.broadband.corbina.ru [95.25.145.167]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: teodor) by hook.sigaev.ru (Postfix) with ESMTPSA id EFBF0B19192; Thu, 19 Apr 2018 09:19:38 +0300 (MSK) Subject: Re: pgsql: Skip full index scan during cleanup of B-tree indexes when possi To: Alexander Korotkov , Peter Geoghegan Cc: Fujii Masao , pgsql-committers References: From: Teodor Sigaev Message-ID: Date: Thu, 19 Apr 2018 09:19:38 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > 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/