Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDbqQ-0004HR-Bl for pgsql-committers@arkaria.postgresql.org; Thu, 16 Jun 2016 18:16:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bDbqP-00017F-Ir for pgsql-committers@arkaria.postgresql.org; Thu, 16 Jun 2016 18:16:45 +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 1bDbqP-000171-4j; Thu, 16 Jun 2016 18:16:45 +0000 Received: from mail-oi0-x236.google.com ([2607:f8b0:4003:c06::236]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bDbqH-0008HF-Pp; Thu, 16 Jun 2016 18:16:43 +0000 Received: by mail-oi0-x236.google.com with SMTP id w5so82266529oib.2; Thu, 16 Jun 2016 11:16:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=crpqdap5uKdZ8q3Kh1a6SFdSMXOLEn7tZQ5N0b34ivg=; b=lbB0Pe6PYxkZBxJVsL/zVmlzykUL6xyFz8CkUFa+XxLCufmSLT/n86a/bSZxAv8Amp q4e8xAm0iJncuK8rdnai/BhaclVPg9fFkFEPcopaVDDK9vqQc2GXaI25eSiECaQgiqdZ 4Z9NaP/lm8rRs49+XdLZgBq+hMNAAosb0IPsb6LTDr105m0yyaty6qlVVxNCe4qBRGFv QdEKErUn6dC6q2wNSIR/aOlCmzJ8QpZgHRYuxOuxoVUUXwLFdzapX/00pznqbTIbkHI0 TnTPJXhHQqPT3b5unJa66M+F4R1PDaxqOObgo3AYXR0PzvvKTmIN950hEoZRTHaoe2BB Fh7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=crpqdap5uKdZ8q3Kh1a6SFdSMXOLEn7tZQ5N0b34ivg=; b=bM3zs7d7D7MdUfK/qVQFaFp5HR09nZMilGUiw9NCu0PflLTVKOb7Fpf5DS3qoUk8Wz Lw31LYRz52fDF7+Q9E4h3xrat66qt7TIBINMEcTB+59ANPj2CYxixDdmNOUzYLMDFuHT KWUe+6nPq29hdq6Tk56ZdGh/w5Ej6DW18a0BT2YG9xseqq0U22oApaQop5e4Z8UQ55bo DxhiPgrE+YgxMC3j6Sh0e0IRyCoR98FWWhMv1rdJNLi1652PbEDKb3t8wm1vfzEJrH6A XUi/sZ4p/ryj+X+VhX4cigHFCf9e1D4lDUd7E/l0TywcVQ46wxEo3QUFOFUYEsBZReaY 6lEg== X-Gm-Message-State: ALyK8tIfUlKj3CUmzeR8N7i8tUi6MNosQoUnbkbb0debP9tb7W9dMgvPnMuwT2Co+++/Hk9m1wDJG6blV15Jag== X-Received: by 10.157.53.40 with SMTP id o37mr777235otc.79.1466100997019; Thu, 16 Jun 2016 11:16:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.168.105 with HTTP; Thu, 16 Jun 2016 11:16:35 -0700 (PDT) In-Reply-To: <20160616180141.rnknufflldy7o5if@alap3.anarazel.de> References: <20160615223440.omhksf4senwtfc6q@alap3.anarazel.de> <20160616015730.rtozaq5mmlhci6xy@alap3.anarazel.de> <20160616153745.upxilwj3spbi43dj@alap3.anarazel.de> <20160616161426.bapgkbh762ktzyhk@alap3.anarazel.de> <20160616165440.pla4q3gbozyciuyo@alap3.anarazel.de> <20160616180141.rnknufflldy7o5if@alap3.anarazel.de> From: Kevin Grittner Date: Thu, 16 Jun 2016 13:16:35 -0500 Message-ID: Subject: Re: [HACKERS] Re: pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold < To: Andres Freund Cc: Robert Haas , Alvaro Herrera , Ants Aasma , Amit Kapila , Noah Misch , Kevin Grittner , "pgsql-hackers@postgresql.org" , "pgsql-committers@postgresql.org" Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.7 (--) 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 Thu, Jun 16, 2016 at 1:01 PM, Andres Freund wrote: > The relevant part is the HeapTupleSatisfiesMVCC check, we're using > SatisfiesToast for toast lookups. > > FWIW, I just tried to reproduce this with old_snapshot_threshold = 0 - > but ran into the problem that I couldn't get it to vacuum anything away > (neither main nor toast rel). That appears to be > if (old_snapshot_threshold == 0) > { > if (TransactionIdPrecedes(latest_xmin, MyPgXact->xmin) > && TransactionIdFollows(latest_xmin, xlimit)) > xlimit = latest_xmin; > because latest_xmin always is equal to MyPgXact->xmin, which is actually > kinda unsurprising? Sure -- the STO feature *never* advances the point for early pruning past the earliest still-active transaction ID. If it did we would have all sorts of weird problems. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers