The following bug has been logged on the website:
Bug reference: 16098
Logged by: Alessandro Ferraresi
Email address: alessandro.ferraresi1@gmail.com
PostgreSQL version: 10.6
Operating system: RHEL 7
Description:
Hello there,
I'm experiencing a weird behavior on 10.6 where I see autovacuum running to
prevent wraparound even if autovacuum_freeze_max_age is far away.
The database is brand-new and some tables have been loaded (using copy
command), below some details/parameters:
pgxxxx=> show autovacuum_freeze_max_age;
autovacuum_freeze_max_age
---------------------------
200000000
oldest_current_xid | percent_towards_wraparound |
percent_towards_emergency_autovac
--------------------+----------------------------+-----------------------------------
3210 | 0 |
0
The tables involved have these custom parameters:
Options:
fillfactor=80,
autovacuum_enabled=true,
autovacuum_vacuum_scale_factor=0.00,
autovacuum_analyze_scale_factor=0.00,
autovacuum_vacuum_threshold=500000,
autovacuum_analyze_threshold=50000
From pg stat activity:
age | state | backend_type
query
-----------------------+--------+---------------------------+---------------------------------------------------------------------------------
00:18:32.899444 | active | autovacuum worker | autovacuum: VACUUM
haas.table1 (to prevent wraparound)
00:26:57.660416 | active | autovacuum worker | autovacuum: VACUUM
haas.table2 (to prevent wraparound)
00:26:54.848344 | active | autovacuum worker | autovacuum: VACUUM
haas.table3 (to prevent wraparound)
What could be the root cause of this? I believe this is a bug as I can't
find any other explanation.
Thanks
Alessandro