Question

I would like to understand postgres replication options more, and as I am doing my research, I have come across a concept of autovacuuming in efforts to create routine DB maintenance. My question is whether or not autovacuum settings persist across replications? My initial thought is no, because some of these parameters are set at a server level? But also there are table and DB specific autovacuum options. If I set certain autovacuum properties on a specific postgres table or DB, would these properties translate across replicas of the DBs? Thanks in advance for the help.

Was it helpful?

Solution

VACUUM (both manual and auto) do not run on a physical replica. The results of a VACUUM running on the master get replicated over, just like other changes do. Per-table vacuum settings are stored in database catalog tables, and so get replicated over, but they have no effect unless/until the replica gets promoted.

For logical replica, its VACUUM settings are completely separate from the publisher. Both the server-level and table-level settings are just whatever you set them to.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top