]> granicus.if.org Git - postgresql/blobdiff - src/backend/replication/walsender.c
Reset master xmin when hot_standby_feedback disabled.
[postgresql] / src / backend / replication / walsender.c
index 10e40506965fef3a9b2208b00fbbda26c2fd2e64..490b121362f30f0f8d5100adcf436ebde6ff6837 100644 (file)
@@ -870,9 +870,12 @@ ProcessStandbyHSFeedbackMessage(void)
                 feedbackXmin,
                 feedbackEpoch);
 
-       /* Ignore invalid xmin (can't actually happen with current walreceiver) */
+       /* Unset WalSender's xmin if the feedback message value is invalid */
        if (!TransactionIdIsNormal(feedbackXmin))
+       {
+               MyPgXact->xmin = InvalidTransactionId;
                return;
+       }
 
        /*
         * Check that the provided xmin/epoch are sane, that is, not in the future