pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedVacuum and analyze for objects on physical stand by dbs
4+ messages / 3 participants
[nested] [flat]
* Vacuum and analyze for objects on physical stand by dbs
@ 2023-02-18 01:31 Teja Jakkidi <teja.jakkidi05@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Teja Jakkidi @ 2023-02-18 01:31 UTC (permalink / raw)
To: pgsql-admin <pgsql-admin@lists.postgresql.org>
Hello Admins,
I have an environment with 1 primary and 2 physical stand by instances. We have manually analyzed/ vacuumed tables on primary db recently. Later when we checked analyze, vacuum on stand by dbs in pg_stat_user_tables it returns null. Will vacuum/ analyze do not replicate to stand by instances?? Do we have to run separately on all the Stand by instances??
Thanks,
Teja. J.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Vacuum and analyze for objects on physical stand by dbs
@ 2023-02-18 02:27 Tom Lane <tgl@sss.pgh.pa.us>
parent: Teja Jakkidi <teja.jakkidi05@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2023-02-18 02:27 UTC (permalink / raw)
To: Teja Jakkidi <teja.jakkidi05@gmail.com>; +Cc: pgsql-admin <pgsql-admin@lists.postgresql.org>
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 when we checked analyze, vacuum on stand by dbs in pg_stat_user_tables it returns 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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Vacuum and analyze for objects on physical stand by dbs
@ 2023-02-18 15:09 obi reddy <obireddy.g1997@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: obi reddy @ 2023-02-18 15:09 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Teja Jakkidi <teja.jakkidi05@gmail.com>; pgsql-admin <pgsql-admin@lists.postgresql.org>
Hi Teja,
Not required to run separately in standby node,
If we run in master node , automatically it will effect in the slave
also.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
> when we checked analyze, vacuum on stand by dbs in pg_stat_user_tables it
> returns 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
>
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Vacuum and analyze for objects on physical stand by dbs
@ 2023-02-20 21:22 Teja Jakkidi <teja.jakkidi05@gmail.com>
parent: obi reddy <obireddy.g1997@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Teja Jakkidi @ 2023-02-20 21:22 UTC (permalink / raw)
To: obi reddy <obireddy.g1997@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-admin <pgsql-admin@lists.postgresql.org>
--Apple-Mail-9E8FF95A-790D-41DB-9083-A0345E9CBE0A
Content-Type: text/html;
charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D=
utf-8"></head><body dir=3D"auto">Thanks Tom and Obi.<div><br></div><div>Hi O=
bi,</div><div>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.</div><div>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.</div><div><br><div dir=
=3D"ltr">Regards,<div>J. Teja.</div></div><div dir=3D"ltr"><br><blockquote t=
ype=3D"cite">On Feb 18, 2023, at 7:09 AM, obi reddy <obireddy.g1997@gmail=
.com> wrote:<br><br></blockquote></div><blockquote type=3D"cite"><div dir=
=3D"ltr">=EF=BB=BF<div dir=3D"auto">Hi Teja,<div dir=3D"auto"><br></div><div=
dir=3D"auto">Not required to run separately in standby node,</div><div dir=3D=
"auto">If we run in master node , automatically it will effect in the slave a=
lso.are you using vacuum or vacuum full?</div><div dir=3D"auto"><br></div><d=
iv dir=3D"auto">Thanks & Regards </div><div dir=3D"auto">Obireddy.G=
</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_a=
ttr">On Sat, 18 Feb 2023, 07:58 Tom Lane, <<a href=3D"mailto:tgl@sss.pgh.=
pa.us">tgl@sss.pgh.pa.us</a>> wrote:<br></div><blockquote class=3D"gmail_=
quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1e=
x">Teja Jakkidi <<a href=3D"mailto:teja.jakkidi05@gmail.com" target=3D"_b=
lank" rel=3D"noreferrer">teja.jakkidi05@gmail.com</a>> writes:<br>
> 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??<br>
<br>
The data changes will propagate, but those action counters are just<br>
maintained locally to the primary server. Their values on a hot<br>
standby are meaningless, probably always zero, because a standby<br>
*can't* change the data on its own.<br>
<br>
=
regards, tom lane<br>
<br>
<br>
</blockquote></div>
</div></blockquote></div></body></html>=
--Apple-Mail-9E8FF95A-790D-41DB-9083-A0345E9CBE0A--
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2023-02-20 21:22 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-02-18 01:31 Vacuum and analyze for objects on physical stand by dbs Teja Jakkidi <teja.jakkidi05@gmail.com>
2023-02-18 02:27 ` Tom Lane <tgl@sss.pgh.pa.us>
2023-02-18 15:09 ` obi reddy <obireddy.g1997@gmail.com>
2023-02-20 21:22 ` Teja Jakkidi <teja.jakkidi05@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox