pgsql: Add infrastructure for sharing temporary files betweenbackends. - Mailing list pgsql-committers

From Andres Freund
Subject pgsql: Add infrastructure for sharing temporary files betweenbackends.
Date
Msg-id E1eKw4u-0000Is-HY@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Add infrastructure for sharing temporary files between backends.

SharedFileSet allows temporary files to be created by one backend and
then exported for read-only access by other backends, with clean-up
managed by reference counting associated with a DSM segment.  This
includes changes to fd.c and buffile.c to support the new kind of
temporary file.

This will be used by an upcoming patch adding support for parallel
hash joins.

Author: Thomas Munro
Reviewed-By: Peter Geoghegan, Andres Freund, Robert Haas, Rushabh Lathia
Discussion:
    https://postgr.es/m/CAEepm=2W=cOkiZxcg6qiFQP-dHUe09aqTrEMM7yJDrHMhDv_RA@mail.gmail.com
    https://postgr.es/m/CAH2-WznJ_UgLux=_jTgCQ4yFz0iBntudsNKa1we3kN1BAG=88w@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/storage/file/Makefile        |   2 +-
src/backend/storage/file/buffile.c       | 205 +++++++++++++++-
src/backend/storage/file/fd.c            | 395 ++++++++++++++++++++++++++-----
src/backend/storage/file/sharedfileset.c | 244 +++++++++++++++++++
src/include/storage/buffile.h            |   7 +
src/include/storage/fd.h                 |  11 +-
src/include/storage/sharedfileset.h      |  45 ++++
src/tools/pgindent/typedefs.list         |   1 +
8 files changed, 848 insertions(+), 62 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Minor code beautification in partition_bounds_equal.
Next
From: Andres Freund
Date:
Subject: pgsql: Adjust #ifdef EXEC_BACKEND RemovePgTempFilesInDir() call.