pgsql: Reset master xmin when hot_standby_feedback disabled.

Started by Simon Riggsover 13 years ago5 messagescomitters
Jump to latest
#1Simon Riggs
simon@2ndQuadrant.com

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/bd56e74127dea4102d1fc761d65fefbb32146713

Modified Files
--------------
doc/src/sgml/protocol.sgml | 6 +++-
src/backend/replication/walreceiver.c | 42 ++++++++++++++++++++++++--------
src/backend/replication/walsender.c | 5 +++-
3 files changed, 39 insertions(+), 14 deletions(-)

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#2Andres Freund
andres@anarazel.de
In reply to: Simon Riggs (#1)
Re: pgsql: Reset master xmin when hot_standby_feedback disabled.

Hi,

On 2013-02-04 10:35:31 +0000, Simon Riggs wrote:

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.

Unless somebody protests I'd like to backpatch this change to 9.2 and
9.1. This imo is a bugfix, not a new feature. What currently happens <
9.3 when hot_standby_feedback is disabled after being enabled is that
the walsender's xmin horizon doesn't increase until disconnected. That's
pretty hard to diagnose and can cause severe problems.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#3Simon Riggs
simon@2ndQuadrant.com
In reply to: Andres Freund (#2)
Re: pgsql: Reset master xmin when hot_standby_feedback disabled.

On 28 May 2014 23:36, Andres Freund <andres@2ndquadrant.com> wrote:

On 2013-02-04 10:35:31 +0000, Simon Riggs wrote:

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.

Unless somebody protests I'd like to backpatch this change to 9.2 and
9.1. This imo is a bugfix, not a new feature. What currently happens <
9.3 when hot_standby_feedback is disabled after being enabled is that
the walsender's xmin horizon doesn't increase until disconnected. That's
pretty hard to diagnose and can cause severe problems.

Good thought. I'll backpatch.

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#4Andres Freund
andres@anarazel.de
In reply to: Simon Riggs (#3)
Re: pgsql: Reset master xmin when hot_standby_feedback disabled.

On 2014-05-28 23:39:56 +0100, Simon Riggs wrote:

On 28 May 2014 23:36, Andres Freund <andres@2ndquadrant.com> wrote:

On 2013-02-04 10:35:31 +0000, Simon Riggs wrote:

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.

Unless somebody protests I'd like to backpatch this change to 9.2 and
9.1. This imo is a bugfix, not a new feature. What currently happens <
9.3 when hot_standby_feedback is disabled after being enabled is that
the walsender's xmin horizon doesn't increase until disconnected. That's
pretty hard to diagnose and can cause severe problems.

Good thought. I'll backpatch.

Cool. Happy to escape my first backpatch for a little while longer :)!

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#5Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Andres Freund (#4)
Re: pgsql: Reset master xmin when hot_standby_feedback disabled.

Andres Freund wrote:

On 2014-05-28 23:39:56 +0100, Simon Riggs wrote:

Good thought. I'll backpatch.

Cool. Happy to escape my first backpatch for a little while longer :)!

Meh. Pretty sure it'll be a no-brainer for you.

--
�lvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers