pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: tableam: Avoid relying on relation size to determine validity of
Date: Sat, 18 May 2019 02:10:46 +0000
Message-ID: <E1hRooA-0006mU-74@gemulon.postgresql.org> (raw)

tableam: Avoid relying on relation size to determine validity of tids.

Instead add a tableam callback to do so. To avoid adding per
validation overhead, pass a scan to tuple_tid_valid. In heap's case
we'd otherwise incurred a RelationGetNumberOfBlocks() call for each
tid - which'd have added noticable overhead to nodeTidscan.c.

Author: Andres Freund
Reviewed-By: Ashwin Agrawal
Discussion: https://postgr.es/m/20190515185447.gno2jtqxyktylyvs@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/147e3722f7e531f15ba389a4d518efe8cd0bd736

Modified Files
--------------
src/backend/access/heap/heapam.c         | 26 ++++--------
src/backend/access/heap/heapam_handler.c | 10 +++++
src/backend/access/table/tableam.c       | 27 ++++++++++++
src/backend/executor/nodeTidscan.c       | 73 +++++++++++++++++++++-----------
src/backend/utils/adt/tid.c              | 10 ++++-
src/include/access/heapam.h              |  3 +-
src/include/access/tableam.h             | 37 +++++++++++-----
7 files changed, 129 insertions(+), 57 deletions(-)



Message-ID: <E1hRooA-0006mU-74@gemulon.postgresql.org>
Permalink:  ../E1hRooA-0006mU-74@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hRooA-0006mU-74@gemulon.postgresql.org

 · 

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
  Subject: Re: pgsql: tableam: Avoid relying on relation size to determine validity of
  In-Reply-To: <E1hRooA-0006mU-74@gemulon.postgresql.org>
  References: <E1hRooA-0006mU-74@gemulon.postgresql.org>

* 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