postgresql/src/backend/access
Andres Freund 667912aee6 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.GD20772@alap3.anarazel.de

Backpatch into 9.3, where it became more likely that multixacts wrap
around.
2015-06-21 18:57:28 +02:00
..
brin Fix valgrind's "unaddressable bytes" whining about BRIN code. 2015-05-25 21:56:19 -04:00
common Support "expanded" objects, particularly arrays, for better performance. 2015-05-14 12:08:49 -04:00
gin pgindent run for 9.5 2015-05-23 21:35:49 -04:00
gist pgindent run for 9.5 2015-05-23 21:35:49 -04:00
hash Remove unnecessary variables in _hash_splitbucket(). 2015-04-03 16:49:44 -04:00
heap Update README.tuplock 2015-05-25 15:09:05 -03:00
index pgindent run for 9.5 2015-05-23 21:35:49 -04:00
nbtree pgindent run for 9.5 2015-05-23 21:35:49 -04:00
rmgrdesc pgindent run for 9.5 2015-05-23 21:35:49 -04:00
spgist pgindent run for 9.5 2015-05-23 21:35:49 -04:00
tablesample Manual cleanup of pgindent results. 2015-05-24 15:04:10 -04:00
transam Improve multixact emergency autovacuum logic. 2015-06-21 18:57:28 +02:00
Makefile TABLESAMPLE, SQL Standard and extensible 2015-05-15 14:37:10 -04:00