| From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> | 
|---|---|
| To: | Kevin Grittner <kgrittn(at)postgresql(dot)org> | 
| Cc: | pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Re: [COMMITTERS] pgsql: Add the "snapshot too old" feature | 
| Date: | 2016-08-25 19:56:09 | 
| Message-ID: | 20160825195609.GA273578@alvherre.pgsql | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-committers pgsql-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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kevin Grittner | 2016-08-25 20:19:25 | Re: [COMMITTERS] pgsql: Add the "snapshot too old" feature | 
| Previous Message | Tom Lane | 2016-08-25 13:58:28 | pgsql: Fix instability in parallel regression tests. | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Geoghegan | 2016-08-25 19:59:41 | Re: UPSERT strange behavior | 
| Previous Message | Robert Haas | 2016-08-25 19:53:14 | Re: increasing the default WAL segment size |