Refactor pg_rewind for more clear decision making.
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Refactor pg_rewind for more clear decision making. Deciding what to do with each file is now a separate step after all the necessary information has been gathered. It is more clear that way. Previously, the decision-making was divided between process_source_file() and process_target_file(), and it was a bit hard to piece together what the overall rules were. Reviewed-by: Kyotaro Horiguchi, Soumyadeep Chakraborty Discussion: https://www.postgresql.org/message-id/0c5b3783-af52-3ee5-f8fa-6e794061f70d%40iki.fi
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_rewind/copy_fetch.c | modified | +9 −5 |
| src/bin/pg_rewind/filemap.c | modified | +300 −272 |
| src/bin/pg_rewind/filemap.h | modified | +49 −27 |
| src/bin/pg_rewind/file_ops.c | modified | +13 −3 |
| src/bin/pg_rewind/libpq_fetch.c | modified | +8 −4 |
| src/bin/pg_rewind/parsexlog.c | modified | +1 −1 |
| src/bin/pg_rewind/pg_rewind.c | modified | +6 −2 |
Discussion
- Refactor pg_rewind code and make it work against a standby 18 messages · 2020-08-19 → 2020-11-20