postgresql/src/backend/postmaster
Alvaro Herrera 15739393e4 Fix autovacuum for shared relations
The table-skipping logic in autovacuum would fail to consider that
multiple workers could be processing the same shared catalog in
different databases.  This normally wouldn't be a problem: firstly
because autovacuum workers not for wraparound would simply ignore tables
in which they cannot acquire lock, and secondly because most of the time
these tables are small enough that even if multiple for-wraparound
workers are stuck in the same catalog, they would be over pretty
quickly.  But in cases where the catalogs are severely bloated it could
become a problem.

Backpatch all the way back, because the problem has been there since the
beginning.

Reported by Ondřej Světlík

Discussion: https://www.postgresql.org/message-id/572B63B1.3030603%40flexibee.eu
	https://www.postgresql.org/message-id/572A1072.5080308%40flexibee.eu
2016-05-10 16:23:54 -03:00
..
autovacuum.c Fix autovacuum for shared relations 2016-05-10 16:23:54 -03:00
bgworker.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
bgwriter.c Revert bf08f2292f 2016-04-06 14:03:46 +01:00
checkpointer.c Provide much better wait information in pg_stat_activity. 2016-03-10 12:44:09 -05:00
fork_process.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
Makefile Allow background workers to be started dynamically. 2013-07-16 13:02:15 -04:00
pgarch.c Avoid unlikely data-loss scenarios due to rename() without fsync. 2016-03-09 18:53:53 -08:00
pgstat.c Use GRANT system to manage access to sensitive functions 2016-04-06 21:45:32 -04:00
postmaster.c Merge wal_level "archive" and "hot_standby" into new name "replica" 2016-03-18 23:56:03 +01:00
startup.c Rework wait for AccessExclusiveLocks on Hot Standby 2016-03-10 19:26:24 +00:00
syslogger.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
walwriter.c Provide much better wait information in pg_stat_activity. 2016-03-10 12:44:09 -05:00