Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tYoMe-00FU9r-8h for pgsql-general@arkaria.postgresql.org; Fri, 17 Jan 2025 15:34:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tYoMc-000WJ8-SX for pgsql-general@arkaria.postgresql.org; Fri, 17 Jan 2025 15:34:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tYoMc-000WIz-Hs for pgsql-general@lists.postgresql.org; Fri, 17 Jan 2025 15:34:27 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tYoMa-0002eL-3B for pgsql-general@lists.postgresql.org; Fri, 17 Jan 2025 15:34:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 50HFYNwl2247798; Fri, 17 Jan 2025 10:34:23 -0500 From: Tom Lane To: Franjo Stipanovic cc: pgsql-general@lists.postgresql.org Subject: Re: Different Autovacuum Settings on Master and Replica in Streaming Replication In-reply-to: References: Comments: In-reply-to Franjo Stipanovic message dated "Fri, 17 Jan 2025 15:37:34 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2247796.1737128063.1@sss.pgh.pa.us> Date: Fri, 17 Jan 2025 10:34:23 -0500 Message-ID: <2247797.1737128063@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Franjo Stipanovic 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