pgsql: Move fake LSN infrastructure out of GiST. - Mailing list pgsql-committers

From Peter Geoghegan
Subject pgsql: Move fake LSN infrastructure out of GiST.
Date
Msg-id E1w1C5N-0002u7-06@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Move fake LSN infrastructure out of GiST.

Move utility functions used by GiST to generate fake LSNs into xlog.c
and xloginsert.c, so that other index AMs can also generate fake LSNs.

Preparation for an upcoming commit that will add support for fake LSNs
to nbtree, allowing its dropPin optimization to be used during scans of
unlogged relations.  That commit is itself preparation for another
upcoming commit that will add a new amgetbatch/btgetbatch interface to
enable I/O prefetching.

Bump XLOG_PAGE_MAGIC due to XLOG_GIST_ASSIGN_LSN becoming
XLOG_ASSIGN_LSN.

Author: Peter Geoghegan <pg@bowt.ie>
Reviewed-By: Andres Freund <andres@anarazel.de>
Reviewed-By: Tomas Vondra <tomas@vondra.me>
Discussion: https://postgr.es/m/CAH2-WzkehuhxyuA8quc7rRN3EtNXpiKsjPfO8mhb+0Dr2K0Dtg@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/access/gist/gist.c          |  6 ++--
src/backend/access/gist/gistutil.c      | 50 -------------------------------
src/backend/access/gist/gistvacuum.c    |  8 ++---
src/backend/access/gist/gistxlog.c      | 21 -------------
src/backend/access/rmgrdesc/gistdesc.c  |  6 ----
src/backend/access/rmgrdesc/xlogdesc.c  |  7 +++++
src/backend/access/transam/xlog.c       | 28 ++++++++++++++++++
src/backend/access/transam/xloginsert.c | 52 +++++++++++++++++++++++++++++++++
src/backend/storage/buffer/bufmgr.c     |  6 ++--
src/include/access/gist_private.h       |  4 ---
src/include/access/gistxlog.h           |  2 +-
src/include/access/xlog.h               |  1 +
src/include/access/xlog_internal.h      |  2 +-
src/include/access/xloginsert.h         |  2 ++
src/include/catalog/pg_control.h        |  2 +-
15 files changed, 103 insertions(+), 94 deletions(-)


pgsql-committers by date:

Previous
From: Jeff Davis
Date:
Subject: pgsql: Add error code to user-visible message.
Next
From: Peter Geoghegan
Date:
Subject: pgsql: Use fake LSNs to improve nbtree dropPin behavior.