From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Improve multixact emergency autovacuum logic. |
Date: | 2015-06-21 17:06:28 |
Message-ID: | E1Z6ihQ-0004jF-ID@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Improve multixact emergency autovacuum logic.
Previously autovacuum was not necessarily triggered if space in the
members slru got tight. The first problem was that the signalling was
tied to values in the offsets slru, but members can advance much
faster. Thats especially a problem if old sessions had been around that
previously prevented the multixact horizon to increase. Secondly the
skipping logic doesn't work if the database was restarted after
autovacuum was triggered - that knowledge is not preserved across
restart. This is especially a problem because it's a common
panic-reaction to restart the database if it gets slow to
anti-wraparound vacuums.
Fix the first problem by separating the logic for members from
offsets. Trigger autovacuum whenever a multixact crosses a segment
boundary, as the current member offset increases in irregular values, so
we can't use a simple modulo logic as for offsets. Add a stopgap for
the second problem, by signalling autovacuum whenver ERRORing out
because of boundaries.
Discussion: 20150608163707(dot)GD20772(at)alap3(dot)anarazel(dot)de
Backpatch into 9.3, where it became more likely that multixacts wrap
around.
Branch
------
REL9_3_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/2031931440e382c58fe21944c5e707e4a16da5df
Modified Files
--------------
src/backend/access/transam/multixact.c | 65 +++++++++++++++++++++++---------
1 file changed, 48 insertions(+), 17 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2015-06-21 19:23:53 | pgsql: Add transforms to pg_get_object_address and friends |
Previous Message | Andres Freund | 2015-06-21 17:06:27 | pgsql: Improve multixact emergency autovacuum logic. |