From: Masahiko Sawada <msawada@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add TIDStore, to store sets of TIDs (ItemPointerData) efficientl
Date: Thu, 21 Mar 2024 01:10:29 +0000
Message-ID: <E1rn6wv-004rNm-9m@gemulon.postgresql.org> (raw)
Add TIDStore, to store sets of TIDs (ItemPointerData) efficiently.
TIDStore is a data structure designed to efficiently store large sets
of TIDs. For TID storage, it employs a radix tree, where the key is
a block number, and the value is a bitmap representing offset
numbers. The TIDStore can be created on a DSA area and used by
multiple backend processes simultaneously.
There are potential future users such as tidbitmap.c, though it's very
likely the interface will need to evolve as we come to understand the
needs of different kinds of users. For example, we can support
updating the offset bitmap of existing values.
Currently, the TIDStore is not used for anything yet, aside from the
test code. But an upcoming patch will use it.
This includes a unit test module, in src/test/modules/test_tidstore.
Co-authored-by: John Naylor
Discussion: https://postgr.es/m/CAD21AoAfOZvmfR0j8VmZorZjL7RhTiQdVttNuC4W-Shdc2a-AA%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/30e144287a72529c9cd9fd6b07fe96eb8a1e270e
Modified Files
--------------
src/backend/access/common/Makefile | 1 +
src/backend/access/common/meson.build | 1 +
src/backend/access/common/tidstore.c | 463 +++++++++++++++++++++
src/include/access/tidstore.h | 49 +++
src/test/modules/Makefile | 1 +
src/test/modules/meson.build | 1 +
src/test/modules/test_tidstore/.gitignore | 4 +
src/test/modules/test_tidstore/Makefile | 23 +
.../test_tidstore/expected/test_tidstore.out | 97 +++++
src/test/modules/test_tidstore/meson.build | 33 ++
.../modules/test_tidstore/sql/test_tidstore.sql | 65 +++
.../modules/test_tidstore/test_tidstore--1.0.sql | 27 ++
src/test/modules/test_tidstore/test_tidstore.c | 317 ++++++++++++++
.../modules/test_tidstore/test_tidstore.control | 4 +
src/tools/pgindent/typedefs.list | 5 +
15 files changed, 1091 insertions(+)
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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: msawada@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add TIDStore, to store sets of TIDs (ItemPointerData) efficientl
In-Reply-To: <E1rn6wv-004rNm-9m@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