1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

Reset master xmin when hot_standby_feedback disabled.

If walsender has xmin of standby then ensure we
reset the value to 0 when we change from hot_standby_feedback=on
to hot_standby_feedback=off.
This commit is contained in:
Simon Riggs
2013-02-04 10:29:22 +00:00
parent 62e666400d
commit bd56e74127
3 changed files with 39 additions and 14 deletions

View 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