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: bitmap table scan.
Date: Mon, 01 Apr 2019 01:42:13 +0000
Message-ID: <E1hAlxl-0001xs-DR@gemulon.postgresql.org> (raw)

tableam: bitmap table scan.

This moves bitmap heap scan support to below an optional tableam
callback. It's optional as the whole concept of bitmap heapscans is
fairly block specific.

This basically moves the work previously done in bitgetpage() into the
new scan_bitmap_next_block callback, and the direct poking into the
buffer done in BitmapHeapNext() into the new scan_bitmap_next_tuple()
callback.

The abstraction is currently somewhat leaky because
nodeBitmapHeapscan.c's prefetching and visibilitymap based logic
remains - it's likely that we'll later have to move more into the
AM. But it's not trivial to do so without introducing a significant
amount of code duplication between the AMs, so that's a project for
later.

Note that now nodeBitmapHeapscan.c and the associated node types are a
bit misnamed. But it's not clear whether renaming wouldn't be a cure
worse than the disease. Either way, that'd be best done in a separate
commit.

Author: Andres Freund
Reviewed-By: Robert Haas (in an older version)
Discussion: https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bfbcad478f05794e5e7ea1339e62a1d258c99b6c

Modified Files
--------------
src/backend/access/heap/heapam_handler.c  | 155 +++++++++++++++++++++
src/backend/access/table/tableamapi.c     |   3 +
src/backend/executor/nodeBitmapHeapscan.c | 215 +++++-------------------------
src/backend/optimizer/util/plancat.c      |   3 +-
src/include/access/tableam.h              |  98 +++++++++++++-
src/include/nodes/execnodes.h             |   4 +-
src/include/nodes/tidbitmap.h             |   2 +-
7 files changed, 293 insertions(+), 187 deletions(-)



Message-ID: <E1hAlxl-0001xs-DR@gemulon.postgresql.org>
Permalink:  ../E1hAlxl-0001xs-DR@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hAlxl-0001xs-DR@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: bitmap table scan.
  In-Reply-To: <E1hAlxl-0001xs-DR@gemulon.postgresql.org>
  References: <E1hAlxl-0001xs-DR@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