git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: f81e97d) | patch
pg_rewind: Refactor the abstraction to fetch from local/libpq source.
Wed, 4 Nov 2020 09:21:18 +0000 (11:21 +0200)
Wed, 4 Nov 2020 09:21:18 +0000 (11:21 +0200)
commit 37d2ff38031262a1778bc76a9c55fff7afbcf275
pg_rewind: Refactor the abstraction to fetch from local/libpq source.

This makes the abstraction of a "source" server more clear, by introducing
a common abstract class, borrowing the object-oriented programming term,
that represents all the operations that can be done on the source server.
There are two implementations of it, one for fetching via libpq, and
another to fetch from a local directory. This adds some code, but makes it
easier to understand what's going on.

The copy_executeFileMap() and libpq_executeFileMap() functions contained
basically the same logic, just calling different functions to fetch the
source files. Refactor so that the common logic is in one place, in a new
function called perform_rewind().

Reviewed-by: Kyotaro Horiguchi, Soumyadeep Chakraborty
Discussion: https://www.postgresql.org/message-id/0c5b3783-af52-3ee5-f8fa-6e794061f70d%40iki.fi
12 files changed:
src/bin/pg_rewind/Makefile diff | blob | blame | history
src/bin/pg_rewind/copy_fetch.c [deleted file] blob | blame | history
src/bin/pg_rewind/fetch.c [deleted file] blob | blame | history
src/bin/pg_rewind/fetch.h [deleted file] blob | blame | history
src/bin/pg_rewind/file_ops.c diff | blob | blame | history
src/bin/pg_rewind/file_ops.h diff | blob | blame | history
src/bin/pg_rewind/libpq_source.c [moved from src/bin/pg_rewind/libpq_fetch.c with 65% similarity] diff | blob | blame | history
src/bin/pg_rewind/local_source.c [new file with mode: 0644] blob
src/bin/pg_rewind/pg_rewind.c diff | blob | blame | history
src/bin/pg_rewind/pg_rewind.h diff | blob | blame | history
src/bin/pg_rewind/rewind_source.h [new file with mode: 0644] blob
src/tools/pgindent/typedefs.list diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /