Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bIsFh-00081s-4M for pgsql-committers@arkaria.postgresql.org; Fri, 01 Jul 2016 06:48:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bIsFg-0003M8-MO for pgsql-committers@arkaria.postgresql.org; Fri, 01 Jul 2016 06:48:36 +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 1bIsFf-0003Le-Rd; Fri, 01 Jul 2016 06:48:35 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bIsFb-0003qK-8p; Fri, 01 Jul 2016 06:48:35 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BE83C20242; Fri, 1 Jul 2016 02:48:28 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Fri, 01 Jul 2016 02:48:28 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=Kb/G0AdT1PkfnEdVmiMfuengr3Y=; b=EP3/0 gLfBOrzLWGb6BzTrIkBhTWvVaiP+qI7yfFL0hrpJABvesfpEBQdQ7oB8GMrkMJ4j jp1dOB1mu46OQ8k+niv+jgB6UgDuD7coIovpxw67zhN87CqVvk12p867JFzl7vE3 rRGpOEsS8SSMoQDEZRxgAGszc8dUk5+vUKiIIY= X-Sasl-enc: BSBza/NG6+DjCw4BfV+sZv5ui2h98y2FNdedVH9Xk18y 1467355708 Received: from intern.anarazel.de (unknown [192.77.237.104]) by mail.messagingengine.com (Postfix) with ESMTPA id 722A2F29F4; Fri, 1 Jul 2016 02:48:28 -0400 (EDT) Date: Thu, 30 Jun 2016 23:48:26 -0700 From: Andres Freund To: Noah Misch Cc: Kevin Grittner , Robert Haas , Alvaro Herrera , Ants Aasma , Amit Kapila , Kevin Grittner , "pgsql-hackers@postgresql.org" , "pgsql-committers@postgresql.org" Subject: Re: pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold < Message-ID: <20160701064826.mpc45le42sibrrx5@alap3.anarazel.de> References: <20160616161426.bapgkbh762ktzyhk@alap3.anarazel.de> <20160616165440.pla4q3gbozyciuyo@alap3.anarazel.de> <20160616180141.rnknufflldy7o5if@alap3.anarazel.de> <20160616183207.wygoktoplycdzav7@alap3.anarazel.de> <20160701035118.GA1426591@tornado.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160701035118.GA1426591@tornado.leadboat.com> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org On 2016-06-30 23:51:18 -0400, Noah Misch wrote: > On Thu, Jun 16, 2016 at 01:56:44PM -0500, Kevin Grittner wrote: > > On Thu, Jun 16, 2016 at 1:32 PM, Andres Freund wrote: > > > > > With old_snapshot_threshold=1 I indeed can reproduce the issue. I > > > disabled autovacuum, to make the scheduling more predictable. But it > > > should "work" just as well with autovacuum. > > > > > > S1: CREATE TABLE toasted(largecol text); > > > INSERT INTO toasted SELECT string_agg(random()::text, '-') FROM generate_series(1, 10000000); > > > BEGIN; > > > DELETE FROM toasted; > > > S2: BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ; > > > S2: SELECT hashtext(largecol), length(largecol) FROM toasted; > > >> ... > > > S1: COMMIT; > > > S2: SELECT hashtext(largecol), length(largecol) FROM toasted; > > >> ... > > > S1: /* wait for snapshot threshold to be passed */ > > > S1: VACUUM pg_toast.pg_toast_16437; > > >> INFO: 00000: "pg_toast_16437": found 61942 removable, 0 nonremovable row versions in 15486 out of 15486 pages > > >> DETAIL: 0 dead row versions cannot be removed yet. > > > S2: SELECT hashtext(largecol), length(largecol) FROM toasted; > > > ERROR: XX000: missing chunk number 0 for toast value 16455 in pg_toast_16437 > > > LOCATION: toast_fetch_datum, tuptoaster.c:1945 > > > > Thanks! That's something I should be able to work with. > > Unfortunately, I am going to be on vacation, so I won't have any > > results until sometime after 28 June. > > This PostgreSQL 9.6 open item is past due for your status update. Kindly send > a status update within 24 hours, and include a date for your subsequent status > update. Refer to the policy on open item ownership: > http://www.postgresql.org/message-id/20160527025039.GA447393@tornado.leadboat.com IIRC Kevin is out of the office this week, so this'll have to wait till next week. Andres -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers