• Heikki Linnakangas's avatar
    pg_rewind: Refactor the abstraction to fetch from local/libpq source. · 37d2ff38
    Heikki Linnakangas authored
    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
    37d2ff38
Makefile 1.37 KB