diff options
author | Heikki Linnakangas | 2020-11-04 09:21:18 +0000 |
---|---|---|
committer | Heikki Linnakangas | 2020-11-04 09:21:18 +0000 |
commit | 37d2ff38031262a1778bc76a9c55fff7afbcf275 (patch) | |
tree | 309e1c231f9acfbd012c139b816cf5384b00d52a /src/bin/pg_rewind/pg_rewind.h | |
parent | f81e97d0475cd4bc597adc23b665bd84fbf79a0d (diff) |
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
Diffstat (limited to 'src/bin/pg_rewind/pg_rewind.h')
-rw-r--r-- | src/bin/pg_rewind/pg_rewind.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/bin/pg_rewind/pg_rewind.h b/src/bin/pg_rewind/pg_rewind.h index 67f90c2a38c..0dc3dbd5255 100644 --- a/src/bin/pg_rewind/pg_rewind.h +++ b/src/bin/pg_rewind/pg_rewind.h @@ -20,8 +20,6 @@ /* Configuration options */ extern char *datadir_target; -extern char *datadir_source; -extern char *connstr_source; extern bool showprogress; extern bool dry_run; extern bool do_sync; @@ -31,9 +29,6 @@ extern int WalSegSz; extern TimeLineHistoryEntry *targetHistory; extern int targetNentries; -/* general state */ -extern PGconn *conn; - /* Progress counters */ extern uint64 fetch_size; extern uint64 fetch_done; |