Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pTCxI-0006zA-Oi for pgsql-admin@arkaria.postgresql.org; Sat, 18 Feb 2023 02:28:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pTCxG-0005Wn-6C for pgsql-admin@arkaria.postgresql.org; Sat, 18 Feb 2023 02:28:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pTCxF-0005VF-Qr for pgsql-admin@lists.postgresql.org; Sat, 18 Feb 2023 02:28:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pTCxA-0005oG-8l for pgsql-admin@lists.postgresql.org; Sat, 18 Feb 2023 02:28:01 +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 31I2Rrpw2914860; Fri, 17 Feb 2023 21:27:53 -0500 From: Tom Lane To: Teja Jakkidi cc: pgsql-admin Subject: Re: Vacuum and analyze for objects on physical stand by dbs In-reply-to: References: Comments: In-reply-to Teja Jakkidi message dated "Fri, 17 Feb 2023 17:31:08 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2914858.1676687273.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 17 Feb 2023 21:27:53 -0500 Message-ID: <2914859.1676687273@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Teja Jakkidi writes: > I have an environment with 1 primary and 2 physical stand by instances. = We have manually analyzed/ vacuumed tables on primary db recently. Later w= hen we checked analyze, vacuum on stand by dbs in pg_stat_user_tables it r= eturns null. Will vacuum/ analyze do not replicate to stand by instances??= Do we have to run separately on all the Stand by instances?? The data changes will propagate, but those action counters are just maintained locally to the primary server. Their values on a hot standby are meaningless, probably always zero, because a standby *can't* change the data on its own. regards, tom lane