Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPeWu-0002Xy-CH for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Jul 2016 23:34:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bPeWt-0004Ro-Qi for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Jul 2016 23:34:23 +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 1bPeVX-0002wU-VD for pgsql-hackers@postgresql.org; Tue, 19 Jul 2016 23:33:00 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bPeVR-0005XD-2I; Tue, 19 Jul 2016 23:32:58 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A3981206D5; Tue, 19 Jul 2016 19:32:51 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Tue, 19 Jul 2016 19:32:51 -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=8EVDxpjmayYNF2N2nXav4fYMrbI=; b=V5FlU teYK1Fl/6f6maLQFg8LmSoGz66KKFBg2AQBA4klxX1SGWHy66khrFfnfhLExNUyA c+tFOfOluN7inBUXqFWVfXk/wKGLQFUFqTe9PF5mOGIVp42IPcd4sieZbEs966sA NTi5enwhpmiM3toMfmGCy6xyNVu0U82O4LXm0s= X-Sasl-enc: CfVNVUczFOqG1pniEfyDblPiQZudSat0DTj+cNKjkjgD 1468971171 Received: from intern.anarazel.de (somacentral1.static.monkeybrains.net [162.217.75.74]) by mail.messagingengine.com (Postfix) with ESMTPA id 2D09BCCD84; Tue, 19 Jul 2016 19:32:51 -0400 (EDT) Date: Tue, 19 Jul 2016 16:32:50 -0700 From: Andres Freund To: Kevin Grittner Cc: Noah Misch , Amit Kapila , Robert Haas , Alvaro Herrera , Ants Aasma , Kevin Grittner , "pgsql-hackers@postgresql.org" Subject: Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold < Message-ID: <20160719233250.nir5vyvzef7m4e7z@alap3.anarazel.de> References: <20160708185221.ez2hnj4yalxaoqnm@alap3.anarazel.de> <20160713174838.oh53exchsuyxxply@alap3.anarazel.de> <20160716224808.GB1908970@tornado.leadboat.com> <20160719021047.GB2027798@tornado.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 2016-07-19 18:09:59 -0500, Kevin Grittner wrote: > As far as I can see, to do this the way that Andres and Amit > suggest involves tying in to indexam.c and other code in incredibly > ugly ways. Could you explain the problem you're seing? Isn't pretty much all all that we need to do: 1) add a InitSnapshotToast(Snapshot originMVCCSnap), which sets SnapshotData->lsn to the the origin snapshot's lsn 2) adapt TestForOldSnapshot() to accept both HeapTupleSatisfiesMVCC and HeapTupleSatisfiesToast? I mean the only difference between toast / plain heap table WRT old_snapshot_threshold is that we don't use a mvcc snapshot. > I think it is entirely the wrong way to go, as I can't > find a way to make it look remotely sane. The question is whether > I should do it the way that I think is sane, or whether someone > else wants to show me what I'm missing by producing at least a > rough patch along these lines. I'll, but I'd prefer you explaining the problem first. Maybe it's me missing the obvious problem. Andres -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers