Обсуждение: pgsql: Refactor sharedfileset.c to separate out fileset implementation.

Поиск
Список
Период
Сортировка

pgsql: Refactor sharedfileset.c to separate out fileset implementation.

От
Amit Kapila
Дата:
Refactor sharedfileset.c to separate out fileset implementation.

Move fileset related implementation out of sharedfileset.c to allow its
usage by backends that don't want to share filesets among different
processes. After this split, fileset infrastructure is used by both
sharedfileset.c and worker.c for the named temporary files that survive
across transactions.

Author: Dilip Kumar, based on suggestion by Andres Freund
Reviewed-by: Hou Zhijie, Masahiko Sawada, Amit Kapila
Discussion: https://postgr.es/m/E1mCC6U-0004Ik-Fs@gemulon.postgresql.org

Branch
------
master

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

Modified Files
--------------
src/backend/replication/logical/launcher.c |   3 +
src/backend/replication/logical/worker.c   |  82 ++++++----
src/backend/storage/file/Makefile          |   1 +
src/backend/storage/file/buffile.c         |  84 +++++-----
src/backend/storage/file/fd.c              |   2 +-
src/backend/storage/file/fileset.c         | 205 ++++++++++++++++++++++++
src/backend/storage/file/sharedfileset.c   | 244 +----------------------------
src/backend/utils/sort/logtape.c           |   8 +-
src/backend/utils/sort/sharedtuplestore.c  |   5 +-
src/include/replication/worker_internal.h  |   1 +
src/include/storage/buffile.h              |  14 +-
src/include/storage/fileset.h              |  40 +++++
src/include/storage/sharedfileset.h        |  14 +-
src/tools/pgindent/typedefs.list           |   1 +
14 files changed, 368 insertions(+), 336 deletions(-)