postgresql/src/backend/access
Michael Paquier dd9ac7d5d8 Revert "Skip redundant anti-wraparound vacuums"
This reverts commit 2aa6e33, that added a fast path to skip
anti-wraparound and non-aggressive autovacuum jobs (these have no sense
as anti-wraparound implies aggressive).  With a cluster using a high
amount of relations with a portion of them being heavily updated, this
could cause autovacuum to lock down, with autovacuum workers attempting
repeatedly those jobs on the same relations for the same database, that
just kept being skipped.  This lock down can be solved with a manual
VACUUM FREEZE.

Justin King has reported one environment where the issue happened, and
Julien Rouhaud and I have been able to reproduce it in a second
environment.  With a very aggressive autovacuum_freeze_max_age,
triggering those jobs with pgbench is a matter of minutes, and hitting
the lock down is a lot harder (my local tests failed to do that).

Note that anti-wraparound and non-aggressive jobs can only be triggered
on a subset of shared catalogs:
- pg_auth_members
- pg_authid
- pg_database
- pg_replication_origin
- pg_shseclabel
- pg_subscription
- pg_tablespace
While the lock down was possible down to v12, the root cause of those
jobs is a much older issue, which needs more analysis.

Bonus thanks to Andres Freund for the discussion.

Reported-by: Justin King
Discussion: https://postgr.es/m/CAE39h22zPLrkH17GrkDgAYL3kbjvySYD1io+rtnAUFnaJJVS4g@mail.gmail.com
Backpatch-through: 12
2020-03-31 08:27:47 +09:00
..
brin Implement operator class parameters 2020-03-30 19:17:23 +03:00
common Implement operator class parameters 2020-03-30 19:17:23 +03:00
gin Implement operator class parameters 2020-03-30 19:17:23 +03:00
gist Implement operator class parameters 2020-03-30 19:17:23 +03:00
hash Implement operator class parameters 2020-03-30 19:17:23 +03:00
heap Revert "Skip redundant anti-wraparound vacuums" 2020-03-31 08:27:47 +09:00
index Remove rudiments of supporting procnum == 0 from 911e702077 2020-03-30 23:43:25 +03:00
nbtree Refactor nbtree high key truncation. 2020-03-30 15:52:39 -07:00
rmgrdesc Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:09 -07:00
spgist Fix missing SP-GiST support in 911e702077 2020-03-30 23:45:03 +03:00
table Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
tablesample Move src/backend/utils/hash/hashfn.c to src/common 2020-02-27 09:25:41 +05:30
transam Improve handling of parameter differences in physical replication 2020-03-30 09:53:45 +02:00
Makefile Introduce access/{table.h, relation.h}, for generic functions from heapam.h. 2019-01-21 10:51:36 -08:00