Greeting!
When performing a force failover in a high availability (HA) database, the Vacuum and Analyze operations may appear as NULL in the new primary database. This issue arises because while the vacuum operation is recorded in the Write-Ahead Log (WAL) files and replayed onto replica servers, user statistics are not updated in the same manner.
After failover, the standby server (now the primary) might show missing user stats, even though the vacuum processes were applied. These missing stats should not affect the execution plans, but if you require updated statistics for performance tuning, it may be necessary to run a full Vacuum and Analyze on the new primary database.
To summarize:
- Vacuum operations on the primary server are replayed onto the standby server via WAL files.
- User statistics are not updated on the standby server during failover.
- Missing user stats do not affect execution plans, but running a full Vacuum and Analyze post-failover can help ensure up-to-date statistics for optimal performance.
Please do not forget to "up-vote" wherever the information provided helps you, as this can be beneficial to other community members.
Regards
Geetha