We have a hot_standby replication configured for our postgresDB, master is for read/write and replica is a read only server.
When I try to fetch the dead tuple count on both master and replica (slave) using the following query
#########vacuum and analyze stats
SELECT relname,last_autovacuum,last_autoanalyze,autovacuum_count,autoanalyze_count FROM pg_stat_user_tables;
#########vacuum and analyze stats
I got the below data on slave server
MyTestDB=# SELECT relname,last_autovacuum,last_autoanalyze,autovacuum_count,autoanalyze_count FROM pg_stat_user_tables;
relname | last_autovacuum | last_autoanalyze | autovacuum_count | autoanalyze_count
-----------------------------------+-----------------+------------------+------------------+-------------------
Table1 | | | 0 | 0
Table2 | | | 0 | 0
Here the question is, does analyze/vacuum applicable for slave server? if so, it should contain some stats like last autovacuum_count, autoanalyze_count?
Note: As per this thread in postgres forum VACUUM and ANALYZE are automatically replicated into slave