pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Kevin Grittner <kgrittn@postgresql.org>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Add the "snapshot too old" feature
Date: Thu, 25 Aug 2016 16:56:09 -0300
Message-ID: <20160825195609.GA273578@alvherre.pgsql> (raw)
In-Reply-To: <E1aocLh-0006C7-2W@gemulon.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Kevin Grittner wrote:
> Add the "snapshot too old" feature

> src/backend/access/gin/ginbtree.c                  |   9 +-
> src/backend/access/gin/gindatapage.c               |   7 +-
> src/backend/access/gin/ginget.c                    |  22 +-
> src/backend/access/gin/gininsert.c                 |   2 +-

I'm wondering about the TestForOldSnapshot call in scanPendingInsert().
Why do we apply it to the metapage buffer (line 1717 in master)?
Shouldn't we apply it to the pending-list pages themselves only, if any?
(If there are no pending-list pages, surely the age of the snapshot used
to read the metapage doesn't matter; and if there are, then the age of
the pending-list pages will fail the test.)


FWIW I like the "revert" commit, because it easily shows me in what
places you considered a snapshot-too-old test and decided not to add
one.  Bare BufferGetPage calls (the current situation) don't indicate that.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
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 (18+ messages)  latest in thread

Message-ID: <20160825195609.GA273578@alvherre.pgsql>
Permalink:  ../20160825195609.GA273578@alvherre.pgsql/
Also on:    postgresql.org/message-id/20160825195609.GA273578@alvherre.pgsql

 · 

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: alvherre@2ndquadrant.com, kgrittn@postgresql.org, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Add the "snapshot too old" feature
  In-Reply-To: <20160825195609.GA273578@alvherre.pgsql>
  References: <E1aocLh-0006C7-2W@gemulon.postgresql.org> <20160825195609.GA273578@alvherre.pgsql>

* 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