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 1pUDch-00032I-LU for pgsql-admin@arkaria.postgresql.org; Mon, 20 Feb 2023 21:22:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pUDce-0000y7-T9 for pgsql-admin@arkaria.postgresql.org; Mon, 20 Feb 2023 21:22:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pUDce-0000xx-FL for pgsql-admin@lists.postgresql.org; Mon, 20 Feb 2023 21:22:56 +0000 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pUDcU-0001ls-8g for pgsql-admin@lists.postgresql.org; Mon, 20 Feb 2023 21:22:50 +0000 Received: by mail-pj1-x102e.google.com with SMTP id o16so2656393pjp.3 for ; Mon, 20 Feb 2023 13:22:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=kRbmgbTPKuma1wHRtN8EwsezGEqs2scX1BMVMIJpd+4=; b=bcpg0B/3H3OujFvd7Ux1QBggYq7erRqDBGzgbTibmu3Rsz/Ptl88kNcu4eTksQRrNB DyApvyad54rV6PMOpp0S1OUZXu65sB8kyh0q2Eoq0A1RHu3hcwakbqTGent4WDPpo+wJ gKYRj/Isv6PU4o3z4/YvRaH7ttOTlbIhtXt+9SQdMpGz7Bv+pjjNnhq4ucZSMc3n4cHc BaZvtj+ZNnU0GsZCWwqQpL9zvE4UhXH5H+Op8J8+xt0Q8I06k9OvQ9noWS/GaidECA4t EoxPTZvN3MMTIlYfpfucoTQkj2igyiGipZHTotBS+1JFOrysqJafX19kfRSRgikyThF4 rZfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kRbmgbTPKuma1wHRtN8EwsezGEqs2scX1BMVMIJpd+4=; b=II0ViqIiFGY0M58hJuwTMmxQHOBuGVjyZT6miqDMZsvpgnE0851uaPF9ofD4sgvXop H8Xqsr66Sn+AnYFVoqkDsJQRjmC0v/o2/JuhMZCtOoVrbvQV6LGUxE2LAwXT4VQjU/C4 9l59Uk5jYpy16UUjXVsTIWsZTpQyfcUP+tsqblmz8iWyz/g/yWQ6iLKyl5CbHwnx4mqm c0A35D6LPUWm3ZW9BlASqn/I+0IPriVCsecgHBRqpPwniWBJP5srbtvYt5/sBc9AtHNP /Oj+xzCSSzQSg3pGi/NEDpaI8aCPUn9fAR6uDOdnu5xF/h4/5EmMAINi64lF0taB4X6i hXAQ== X-Gm-Message-State: AO0yUKU30/L2IEH6NiLOoAUYsAWH/sFxhGQuqltFY368m+BBOy4EmnTG C4nz2uij17QthgBB7oaeuOA= X-Google-Smtp-Source: AK7set8z3P2qELR4fjk3iP+b8yVjWuRmouc+h1MQ5KcUhMN/4xv0fyvePnspjD52TOdAtwm8uKAP9w== X-Received: by 2002:a17:903:2345:b0:19b:64bb:d546 with SMTP id c5-20020a170903234500b0019b64bbd546mr2171688plh.18.1676928164421; Mon, 20 Feb 2023 13:22:44 -0800 (PST) Received: from smtpclient.apple (2603-8001-0200-0026-2595-3684-3cd5-871e.res6.spectrum.com. [2603:8001:200:26:2595:3684:3cd5:871e]) by smtp.gmail.com with ESMTPSA id jb14-20020a170903258e00b0019aaab3f9d7sm8396015plb.113.2023.02.20.13.22.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Feb 2023 13:22:43 -0800 (PST) Content-Type: multipart/alternative; boundary=Apple-Mail-9E8FF95A-790D-41DB-9083-A0345E9CBE0A Content-Transfer-Encoding: 7bit From: Teja Jakkidi Mime-Version: 1.0 (1.0) Subject: Re: Vacuum and analyze for objects on physical stand by dbs Date: Mon, 20 Feb 2023 13:22:32 -0800 Message-Id: <22FA6562-087D-45F1-8813-9ACF4353417E@gmail.com> References: Cc: Tom Lane , pgsql-admin In-Reply-To: To: obi reddy X-Mailer: iPhone Mail (20C65) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail-9E8FF95A-790D-41DB-9083-A0345E9CBE0A Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thanks Tom and Obi.

Hi O= bi,
Autovacuum runs as per the parameters that were set. However w= e were requested to just run vacuum (not full) and analyze on Postgres insta= nces which has stand by instances.
We had run vacuum and analyze o= n primary and just wondering if we need to run it on stand by too. But looks= like Stand bys automatically gets that from primary.

Regards,
J. Teja.

On Feb 18, 2023, at 7:09 AM, obi reddy <obireddy.g1997@gmail= .com> wrote:

=EF=BB=BF
Hi Teja,

Not required to run separately in standby node,
If we run in master node , automatically it will effect in the slave a= lso.are you using vacuum or vacuum full?

Thanks & Regards 
Obireddy.G=

On Sat, 18 Feb 2023, 07:58 Tom Lane, <tgl@sss.pgh.pa.us> wrote:
Teja Jakkidi <teja.jakkidi05@gmail.com> 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 wh= en we checked analyze, vacuum on stand by dbs in pg_stat_user_tables it retu= rns null. Will vacuum/ analyze do not replicate to stand by instances?? Do w= e 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


= --Apple-Mail-9E8FF95A-790D-41DB-9083-A0345E9CBE0A--