• Amit Kapila's avatar
    Fix 020_messages.pl test. · 0a442a40
    Amit Kapila authored
    We were not waiting for a publisher to catch up with the subscriber after
    creating a subscription. Now, it can happen that apply worker starts
    replication even after we have disabled the subscription in the test. This
    will make the test expect that there is no active slot whereas there
    exists one. Fix this symptom by allowing the publisher to wait for
    catching up with the subscription.
    
    It is not a good idea to ensure if the slot is still active by checking
    for walsender existence as we release the slot after we clean up the
    walsender related memory. Fix that by checking the slot status in
    pg_replication_slots.
    
    Also, it is better to avoid repeated enabling/disabling of the
    subscription.
    
    Finally, we make autovacuum off for this test to avoid any empty
    transaction appearing in the test while consuming changes.
    
    Reported-by: as per buildfarm
    Author: Vignesh C
    Reviewed-by: Amit Kapila, Michael Paquier
    Discussion: https://postgr.es/m/CAA4eK1+uW1UGDHDz-HWMHMen76mKP7NJebOTZN4uwbyMjaYVww@mail.gmail.com
    0a442a40
020_messages.pl 4.52 KB