Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bOYNh-0002RY-Uq for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Jul 2016 22:48:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bOYNh-0002v4-DW for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Jul 2016 22:48:21 +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 1bOYNe-0002st-Qm for pgsql-hackers@postgresql.org; Sat, 16 Jul 2016 22:48:18 +0000 Received: from mail-pf0-x22f.google.com ([2607:f8b0:400e:c00::22f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bOYNa-0001En-4J for pgsql-hackers@postgresql.org; Sat, 16 Jul 2016 22:48:18 +0000 Received: by mail-pf0-x22f.google.com with SMTP id h186so727061pfg.3 for ; Sat, 16 Jul 2016 15:48:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=6hGweoDj7r587Vx3yoR7Vbjy+jOwqp9rEQ2vgM8T6KI=; b=L1Xc94k21RY0Kd/m+dTbhLYoQg7GnTNCyWwRMNaVGP4EhZ0d7Yr8wkMzrXBBzcqAKG OvLy9CZY/WjyfJEhDIiNQViyoyk3guqA5yDWSGzwhrv2US1sNl0NYISE4UQ7dlT0Iwks 1Z87Uf5gsvgFgI8hiwIpatywQebr82EHmw6y8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=6hGweoDj7r587Vx3yoR7Vbjy+jOwqp9rEQ2vgM8T6KI=; b=WRLFC1WRnHy0W0jCNAEsXpSatND8jRCr4IkaSSuFfK0Qmer9E+LO69Jnr8ZT9z5J/X V+vHSprApWRTGhsaB0mCYq2aBc6D41OPA7Y2WOMbialxfMkVryq82wVitueKRx2wIk0R Ugjec/77YPDSFegKqeA4RzLRp18RS04L57pY2aZnhz5QZNDhzZ5SjvvIJMfd2rgFqEIz LL16gp2VTs2P9H3Yf2J9aYc31dall7e4u3CyNvnQW5D5mDzd9Z/ch0MZuxCqcRFRHucf eiefZ5hieyoIN2M219NV4mkdVk5pkvaCitFL66x4O3RErq9zBnrwFbFx4tiT8YIbljf0 i+mQ== X-Gm-Message-State: ALyK8tIwgyRCygdn9Miv6AjUReqkD/fVedDmZfkIjvQZYjVwbK41e5t5fE/nlEpOqtonNg== X-Received: by 10.98.57.90 with SMTP id g87mr33471584pfa.106.1468709291699; Sat, 16 Jul 2016 15:48:11 -0700 (PDT) Received: from tornado.leadboat.com (c-98-248-47-228.hsd1.ca.comcast.net. [98.248.47.228]) by smtp.gmail.com with ESMTPSA id tm1sm6460534pab.31.2016.07.16.15.48.09 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 16 Jul 2016 15:48:10 -0700 (PDT) Date: Sat, 16 Jul 2016 18:48:08 -0400 From: Noah Misch To: Kevin Grittner Cc: Andres Freund , Amit Kapila , Robert Haas , Alvaro Herrera , Ants Aasma , Kevin Grittner , "pgsql-hackers@postgresql.org" Subject: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold < Message-ID: <20160716224808.GB1908970@tornado.leadboat.com> References: <20160706215556.cmhtizpbdn6zp464@alap3.anarazel.de> <20160708175349.ue6okmukiny3r6cp@alap3.anarazel.de> <20160708185221.ez2hnj4yalxaoqnm@alap3.anarazel.de> <20160713174838.oh53exchsuyxxply@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Pg-Spam-Score: -2.7 (--) 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 Wed, Jul 13, 2016 at 03:57:02PM -0500, Kevin Grittner wrote: > On Wed, Jul 13, 2016 at 12:48 PM, Andres Freund wrote: > > On 2016-07-13 10:06:52 -0500, Kevin Grittner wrote: > >> On Wed, Jul 13, 2016 at 7:57 AM, Amit Kapila wrote: > >>> On Tue, Jul 12, 2016 at 8:34 PM, Kevin Grittner wrote: > >>>> On Fri, Jul 8, 2016 at 1:52 PM, Andres Freund wrote: > >>>> > >>>>> I'm a bit confused, why aren't we simply adding LSN interlock > >>>>> checks for toast? Doesn't look that hard? Seems like a much more > >>>>> natural course of fixing this issue? > >>>> > >>>> I took some time trying to see what you have in mind, and I'm > >>>> really not "getting it". > >>> > >>> Isn't it possible if we initialize lsn and whenTaken in SnapshotToast > >>> when old_snapshot_threshold > 0 and add a check for > >>> HeapTupleSatisfiesToast in TestForOldSnapshot()? > >> > >> With that approach, how will we know *not* to generate an error > >> when reading the chain of tuples for a value we are deleting. Or > >> positioning to modify an index on toast data. Etc., etc. etc. > > > > I'm not following. How is that different in the toast case than in the > > heap case? > > A short answer is that a normal table's heap doesn't go through > systable_getnext_ordered(). That function is used both for cases > where the check should not be made, like toast_delete_datum(), and > cases where it should, like toast_fetch_datum(). > > Since this keeps coming up, I'll produce a patch this way. I'm > skeptical, but maybe it will look better than I think it will. I > should be able to post that by Friday. 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers