pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Kevin Grittner <kgrittn@gmail.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Ants Aasma <ants.aasma@eesti.ee>
Cc: Kevin Grittner <kgrittn@postgresql.org>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
Date: Tue, 19 Jul 2016 16:32:50 -0700
Message-ID: <20160719233250.nir5vyvzef7m4e7z@alap3.anarazel.de> (raw)
In-Reply-To: <CACjxUsMujjg0peWzBdnNzWPdbMTzZj2j+KgNpEvWdFw+FGYTzA@mail.gmail.com>
References: <CACjxUsNCbsq_p_pVbrjHGfUnFw4i-FtjnHeZrpkOBNUEE_w45Q@mail.gmail.com>
	<20160708185221.ez2hnj4yalxaoqnm@alap3.anarazel.de>
	<CACjxUsNdQdwiU1em=xYsRmgCYV=2FT4nFn9uSA76JEovgLtM9A@mail.gmail.com>
	<CAA4eK1+B4fu5haTGg1ajyuRF9EK2ZhJsgTu7cT1GDArPHqe+0w@mail.gmail.com>
	<CACjxUsNERjp3BBBWfgs4mg3CyA+O0ATN1=O4NM3MWC3_LHP-dg@mail.gmail.com>
	<20160713174838.oh53exchsuyxxply@alap3.anarazel.de>
	<CACjxUsM=QefOrSyO3ReKJu+7_HMLsF4mL=eKVTT=J-9PPzdz8A@mail.gmail.com>
	<20160716224808.GB1908970@tornado.leadboat.com>
	<20160719021047.GB2027798@tornado.leadboat.com>
	<CACjxUsMujjg0peWzBdnNzWPdbMTzZj2j+KgNpEvWdFw+FGYTzA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

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



view thread (195+ messages)  latest in thread

Message-ID: <20160719233250.nir5vyvzef7m4e7z@alap3.anarazel.de>
Permalink:  ../20160719233250.nir5vyvzef7m4e7z@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20160719233250.nir5vyvzef7m4e7z@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, kgrittn@gmail.com, noah@leadboat.com, amit.kapila16@gmail.com, robertmhaas@gmail.com, alvherre@2ndquadrant.com, ants.aasma@eesti.ee, kgrittn@postgresql.org, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
  In-Reply-To: <20160719233250.nir5vyvzef7m4e7z@alap3.anarazel.de>
  References: <CACjxUsNCbsq_p_pVbrjHGfUnFw4i-FtjnHeZrpkOBNUEE_w45Q@mail.gmail.com> <20160708185221.ez2hnj4yalxaoqnm@alap3.anarazel.de> <CACjxUsNdQdwiU1em=xYsRmgCYV=2FT4nFn9uSA76JEovgLtM9A@mail.gmail.com> <CAA4eK1+B4fu5haTGg1ajyuRF9EK2ZhJsgTu7cT1GDArPHqe+0w@mail.gmail.com> <CACjxUsNERjp3BBBWfgs4mg3CyA+O0ATN1=O4NM3MWC3_LHP-dg@mail.gmail.com> <20160713174838.oh53exchsuyxxply@alap3.anarazel.de> <CACjxUsM=QefOrSyO3ReKJu+7_HMLsF4mL=eKVTT=J-9PPzdz8A@mail.gmail.com> <20160716224808.GB1908970@tornado.leadboat.com> <20160719021047.GB2027798@tornado.leadboat.com> <CACjxUsMujjg0peWzBdnNzWPdbMTzZj2j+KgNpEvWdFw+FGYTzA@mail.gmail.com> <20160719233250.nir5vyvzef7m4e7z@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox