public inbox for [email protected]
help / color / mirror / Atom feedDifferent Autovacuum Settings on Master and Replica in Streaming Replication
2+ messages / 2 participants
[nested] [flat]
* Different Autovacuum Settings on Master and Replica in Streaming Replication
@ 2025-01-17 14:37 Franjo Stipanovic <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Franjo Stipanovic @ 2025-01-17 14:37 UTC (permalink / raw)
To: [email protected]
Question regarding autovacuum settings in a PostgreSQL streaming
replication setup. Specifically, I am curious about whether it is possible
(and advisable) to have different values for the following settings on the
master and replica databases:
- autovacuum_vacuum_scale_factor
- autovacuum_analyze_scale_factor
Can the above settings be configured differently on the master and replica
databases in a streaming replication setup? I just tested this on AWS RDS
Postgres.
How would those different settings interact with replication, for example,
if I apply change on master, would it be replicated to replica and override
my replica setting?
I was expecting that this is not possible in streaming replication, only in
logical replication.
Thank you!
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Different Autovacuum Settings on Master and Replica in Streaming Replication
@ 2025-01-17 15:34 Tom Lane <[email protected]>
parent: Franjo Stipanovic <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2025-01-17 15:34 UTC (permalink / raw)
To: Franjo Stipanovic <[email protected]>; +Cc: [email protected]
Franjo Stipanovic <[email protected]> writes:
> Question regarding autovacuum settings in a PostgreSQL streaming
> replication setup. Specifically, I am curious about whether it is possible
> (and advisable) to have different values for the following settings on the
> master and replica databases:
> - autovacuum_vacuum_scale_factor
> - autovacuum_analyze_scale_factor
A streaming replica will not run vacuum on its own, as it just absorbs
the physical changes made by vacuum on the master. Hence, it matters
not at all how you have those values set on the replica.
If the replica is promoted to master, then it will start to use
whatever settings it has (and no, postgresql.conf is not copied
by the replication infrastructure).
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-01-17 15:34 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-01-17 14:37 Different Autovacuum Settings on Master and Replica in Streaming Replication Franjo Stipanovic <[email protected]>
2025-01-17 15:34 ` Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox