Allow pg_rewind to use a standby server as the source system.
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Allow pg_rewind to use a standby server as the source system. Using a hot standby server as the source has not been possible, because pg_rewind creates a temporary table in the source system, to hold the list of file ranges that need to be fetched. Refactor it to queue up the file fetch requests in pg_rewind's memory, so that the temporary table is no longer needed. Also update the logic to compute 'minRecoveryPoint' correctly, when the source is a standby server. Reviewed-by: Kyotaro Horiguchi, Soumyadeep Chakraborty Discussion: https://www.postgresql.org/message-id/0c5b3783-af52-3ee5-f8fa-6e794061f70d%40iki.fi
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/pg_rewind.sgml | modified | +1 −1 |
| src/bin/pg_rewind/libpq_source.c | modified | +202 −85 |
| src/bin/pg_rewind/pg_rewind.c | modified | +82 −15 |
| src/bin/pg_rewind/t/003_extrafiles.pl | modified | +22 −4 |
| src/bin/pg_rewind/t/007_standby_source.pl | added | +174 −0 |
Documentation touched
Discussion
- Refactor pg_rewind code and make it work against a standby 18 messages · 2020-08-19 → 2020-11-20