pgsql: Add infrastructure for sharing temporary files between backends.

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add infrastructure for sharing temporary files between backends.
Date: 2017-12-02 00:54:48
Message-ID: E1eKw4u-0000Is-HY@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2017-12-02 01:35:12 pgsql: Adjust #ifdef EXEC_BACKEND RemovePgTempFilesInDir() call.
Previous Message Robert Haas 2017-12-01 18:55:46 pgsql: Minor code beautification in partition_bounds_equal.