[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: Logical Replication Delay on Remote Server
From:       Ramakrishna m <ram.pgdb () gmail ! com>
Date:       2024-04-24 2:52:20
Message-ID: CAG-eXH+PhDMavx3-XUyR=G8MyMDPdkqWsKkC5+sCrDPiUhJ8FA () mail ! gmail ! com
[Download RAW message or body]

Hi Team,

adding one more point here,

 5. Pg_stat_replication_slot  total_txn count reduces when lag occurs .Does
decoding stop in case of logical replication delay?


On Tue, 23 Apr 2024 at 22:55, Ramakrishna m <ram.pgdb@gmail.com> wrote:

> Hi Team,
>
> I am facing replication lag in postgres16 at times,not able to find the
> reason.
>
> Please find the configuration:
> 1) Two replication slots for two servers (1 is the same data center,
> another remote)
> 2) weekly once/twice facing lag(around 2GB for 1k TPS environment) in the
> remote   replication slot and another same data center server slot with 0
> lag.
>
> My observation:
>
> 1) Noticed pg_stat_replication_slot total_txn reduced from 1k to 5 or 6
> but other  slot is same with 1k TPS
> 2)And noticed lag for remote slot but fine with same data center
> 3) Most importantly I have plenty of Bandwidth available in n/w ,2GB is
> still freely available out of 4GB network.
> 4)No IO issues on servers
> I am not able to prove if this is due to Network .Can you help me how to
> proceed on this?
> At Least how the logical decoding total_txn is counting the view
> pg_stat_replication_slot?
>
> --
> Thanks & Regards,
> Ram.
>


-- 
Thanks & Regards,
Ram.

[Attachment #3 (text/html)]

<div dir="ltr"><div dir="ltr">Hi Team,</div><div dir="ltr"><br><div>adding one more \
point here,</div><div><br></div><div>  5. Pg_stat_replication_slot   total_txn count \
reduces when lag occurs .Does decoding stop in case of logical replication \
delay?</div><div><br></div></div><div dir="ltr"><br><div class="gmail_quote"><div \
dir="ltr" class="gmail_attr">On Tue, 23 Apr 2024 at 22:55, Ramakrishna m &lt;<a \
href="mailto:ram.pgdb@gmail.com" target="_blank">ram.pgdb@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div \
dir="ltr"><div><div><font face="arial, sans-serif">Hi \
Team,<br></font></div><div><font face="arial, sans-serif"><br></font></div><div><font \
face="arial, sans-serif">I am facing  <span>replication</span>  lag in postgres16 at \
times,not able to find the reason.</font></div><div><font face="arial, \
sans-serif"><br>Please find the configuration:<br>1) Two  <span>replication</span>  \
slots for two servers (1 is the same data center, another  \
<span>remote</span>)</font></div><div><font face="arial, sans-serif">2) weekly \
once/twice facing lag(around 2GB for 1k TPS environment) in the  <span>remote</span>  \
<span>replication</span>  slot and another same data center  <span>server</span>  \
slot with 0 lag.<br><br></font></div><div><font face="arial, sans-serif">My \
observation:</font></div><div><font face="arial, sans-serif"><br>1) Noticed \
pg_stat_replication_slot  total_txn reduced from 1k to 5 or 6 but other   slot is \
same with 1k TPS<br>2)And noticed lag for  <span>remote</span>  slot but fine with \
same data center<br>3) Most importantly  I have plenty of Bandwidth available in n/w \
,2GB is still freely available  out of 4GB network.<br>4)No IO issues on servers<br>I \
am not able to prove if this is due to Network .Can you help me how to proceed on \
this?  <br>At Least  how the  <span>logical</span>  decoding  total_txn is counting \
the view pg_stat_replication_slot?<font color="#888888"><br></font></font></div><font \
color="#888888"><br></font></div><span class="gmail_signature_prefix">-- \
</span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">Thanks &amp; \
Regards,<div>Ram.<br></div></div></div></div> </blockquote></div><br \
clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div \
dir="ltr" class="gmail_signature"><div dir="ltr">Thanks &amp; \
Regards,<div>Ram.</div></div></div></div> </div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic