Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dqMiG-0000kB-72 for pgsql-bugs@arkaria.postgresql.org; Fri, 08 Sep 2017 17:05:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dqMiF-0007fx-IJ for pgsql-bugs@arkaria.postgresql.org; Fri, 08 Sep 2017 17:05:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dqMhX-0006Q4-PM for pgsql-bugs@postgresql.org; Fri, 08 Sep 2017 17:04:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dqMhU-0004jE-4J for pgsql-bugs@postgresql.org; Fri, 08 Sep 2017 17:04:19 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v88H4A5e029685; Fri, 8 Sep 2017 13:04:10 -0400 From: Tom Lane To: Alvaro Herrera cc: "Wong, Yi Wen" , Michael Paquier , Peter Geoghegan , "Wood, Dan" , "pgsql-bugs@postgresql.org" Subject: Re: Old row version in hot chain become visible after a freeze In-reply-to: <20170908164244.5oi6rcvy5ut7dpkb@alvherre.pgsql> References: <20170908164244.5oi6rcvy5ut7dpkb@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 08 Sep 2017 18:42:44 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29683.1504890250.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 08 Sep 2017 13:04:10 -0400 Message-ID: <29684.1504890250@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Alvaro Herrera writes: > Wong, Yi Wen wrote: >> lazy_record_dead_tuple may fail to record the heap for later pruning >> for lazy_vacuum_heap if there is already a sufficiently large number of = dead tuples >> in the array: > Hmm, ouch, good catch. > AFAICS this is a shouldn't-happen condition, since we bail out of the > loop pessimistically as soon as we would be over the array limit if the > next page were to be full of dead tuples (i.e., we never give the chance > for overflow to actually happen). So unless I misunderstand, this could > only fail if you give maint_work_mem smaller than necessary for one > pageful of dead tuples, which should be about 1800 bytes ... > If we wanted to be very sure about this we could add a test and perhaps > abort the vacuum, but I'm not sure it's worth the trouble. I think if we're going to depend on that, we should change the logic from "don't record tuple if no space" to "throw error on no space". regards, tom lane --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs