• Peter Eisentraut's avatar
    Logical replication support for initial data copy · 7c4f5240
    Peter Eisentraut authored
    Add functionality for a new subscription to copy the initial data in the
    tables and then sync with the ongoing apply process.
    
    For the copying, add a new internal COPY option to have the COPY source
    data provided by a callback function.  The initial data copy works on
    the subscriber by receiving COPY data from the publisher and then
    providing it locally into a COPY that writes to the destination table.
    
    A WAL receiver can now execute full SQL commands.  This is used here to
    obtain information about tables and publications.
    
    Several new options were added to CREATE and ALTER SUBSCRIPTION to
    control whether and when initial table syncing happens.
    
    Change pg_dump option --no-create-subscription-slots to
    --no-subscription-connect and use the new CREATE SUBSCRIPTION
    ... NOCONNECT option for that.
    
    Author: Petr Jelinek <petr.jelinek@2ndquadrant.com>
    Tested-by: default avatarErik Rijkers <er@xs4all.nl>
    7c4f5240
subscription.out 3.6 KB