Re: Different Autovacuum Settings on Master and Replica in Streaming Replication

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Franjo Stipanovic <fritzfs(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Different Autovacuum Settings on Master and Replica in Streaming Replication
Date: 2025-01-17 15:34:23
Message-ID: 2247797.1737128063@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Franjo Stipanovic <fritzfs(at)gmail(dot)com> 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Lelarge 2025-01-17 15:34:31 Re: Different Autovacuum Settings on Master and Replica in Streaming Replication
Previous Message Tom Lane 2025-01-17 15:27:04 Re: glibc 2.35-2.39 upgrade requirements