Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUDe1-0003i2-Hm for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Dec 2017 15:29:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUDe1-0004H8-4w for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Dec 2017 15:29:25 +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.84_2) (envelope-from ) id 1eUDe0-0004Gy-Sg for pgsql-bugs@lists.postgresql.org; Wed, 27 Dec 2017 15:29:25 +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 1eUDdx-0004Qr-Co for pgsql-bugs@postgresql.org; Wed, 27 Dec 2017 15:29:23 +0000 Received: from xor.sai.msu.ru (unknown [93.174.131.141]) (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 0A915B19192; Wed, 27 Dec 2017 18:29:18 +0300 (MSK) Subject: Re: 10.1: hash index size exploding on vacuum full analyze To: Amit Kapila Cc: AP , PostgreSQL Bugs References: <20171115232922.5tomkxnw3iq6jsg7@inml.weebeastie.net> <20171119233157.y5zqrn6ccvzxfw4w@inml.weebeastie.net> From: Teodor Sigaev Message-ID: <4356d9d4-e702-985f-eeda-de0b7e4a6b58@sigaev.ru> Date: Wed, 27 Dec 2017 18:29:18 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk thank you, pushed Amit Kapila wrote: > On Tue, Dec 26, 2017 at 9:48 PM, Teodor Sigaev wrote: >>> Initially, I have also thought of doing it in swap_relation_files, but >>> we don't have stats values there. We might be able to pass it, but >>> not sure if there is any need for same. As far as Toast table's case >>> is concerned, I don't see the problem because we are copying the data >>> row-by-row only for heap where the value of num_tuples and num_pages >>> could be different. See copy_heap_data. >> >> >> Ok, agree. AP (sorry, I don't see your name), could your check that patch >> fixes your issue? >> >> Nevertheless, I'm going to push this patch in any case and, suppose, it >> should be backpatched to version 10 too, although the bug is not about data >> loss or any corruption. But patch looks rather straightforward and has low >> risk of some new bugs. >> > > Ideally, we can backpatch this patch to prior versions as well, but I > think users will see this problem in v10 onwards (as hash indexes are > primarily getting used from v10), so it seems okay to backpatch till > 10. In future, if we see any other symptom in prior branches, then we > can always backpatch it. > > -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/