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 1rzJu3-00387d-10 for pgsql-general@arkaria.postgresql.org; Tue, 23 Apr 2024 17:25:59 +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 1rzJu1-009lG7-2K for pgsql-general@arkaria.postgresql.org; Tue, 23 Apr 2024 17:25:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rzJu0-009lFz-Ly for pgsql-general@lists.postgresql.org; Tue, 23 Apr 2024 17:25:56 +0000 Received: from mail-oa1-x36.google.com ([2001:4860:4864:20::36]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rzJty-002YbJ-1e for pgsql-general@lists.postgresql.org; Tue, 23 Apr 2024 17:25:55 +0000 Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-2330f85c2ebso3500117fac.1 for ; Tue, 23 Apr 2024 10:25:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713893152; x=1714497952; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=F4M2LlqNKj/D8T1icp43o1kddyBScB9ME/m9cUHw48M=; b=BdeijyHjfFxE8StfXcQT0RRET1lmueAH0EuyvznSue98iW2t+S+gUrFcxP60GoKYHV pUHb3T3+TnxJGEglinwaPYNR1nuDW59bvcRdtlk8ZuDyKLMYGlJAThlBBxbnQRpwGMsE cTANyFkVjbEgFz0K9eHoNDhocLvB6dSFI2bdOrySq5kPb+hGC8j6v3sFLA8R/woA95v3 uUjo5MgpfA9Bg5CzAltAQlMWh7irEe9fe9ejb4l8o6hh8Ran9PgEoGZcDOPcMoANVvML jV8t06NhECRJh3C/tUczaKUb19yUx0mtzOQ4CgXE+AunqoPUI1wvSvOQXvouNJb4gFG1 nBxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713893152; x=1714497952; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=F4M2LlqNKj/D8T1icp43o1kddyBScB9ME/m9cUHw48M=; b=u+JnuRgK+4zR1jUmUhPUE7SWqyu2Mll5XlD5Pryba6xrVIufz0nIsya4VyVk0AQJhG 0Xy/anvpdXqpmay1BzuF/lVpLozXz1NujXHnPAIP7qP1dr9NsiXF/hDuWUtGb5fnbK9m zwaZvy6+KL6ivNG909is9ILSR8tXQUQ/+UCvixiaNcih3BRrgiekLyo0jWotBrZlJx41 dUCV/PGjGbTNy2xRzrgebewhN1tgmzGyy0z7FrH8po3cg4kMFrreD16a/rTwbGONmObU jlH5SXGf921ogoCfgFdFexs8vDcFL7AcESDT16XIHiWUy7qZvcug/WnYx18NHs2Nlmnt aYEA== X-Gm-Message-State: AOJu0YxO0Hhvs+8IcJM3c9WnCp8I2UVKpNw8TytkTnjhXmn1KM2yc0le pLzxsX1eOL3L6b6JQoD9CWe/ktk7LpwFp6XZZaOks/MR6uIWCl8+XPEAQrfQqxJw1MBaO/k9TbE NxotAurk8eV2PVwyNjaiZF6kC/E9r8pH4 X-Google-Smtp-Source: AGHT+IEmIXq5YVhv5oy0x5NAnciTsaYmbhMTnpv5JNLjSD8AtAQ7wE7k5+iyyOpV2ZbQQ6DzZF1ncDM3s04Kx0NqwLs= X-Received: by 2002:a05:6871:b22:b0:22e:cd9f:4e55 with SMTP id fq34-20020a0568710b2200b0022ecd9f4e55mr17477193oab.50.1713893151595; Tue, 23 Apr 2024 10:25:51 -0700 (PDT) MIME-Version: 1.0 From: Ramakrishna m Date: Tue, 23 Apr 2024 22:55:40 +0530 Message-ID: Subject: Logical Replication Delay on Remote Server To: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000007be5140616c6d8e5" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000007be5140616c6d8e5 Content-Type: text/plain; charset="UTF-8" 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. --0000000000007be5140616c6d8e5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Team,

I am facing=C2=A0repli= cation=C2=A0lag in postgres16 at times,not able to find the reason.<= /font>

Please find the confi= guration:
1) Two=C2=A0replication=C2=A0s= lots for two servers (1 is the same data center, another=C2=A0remote)
2) weekly once/twice facing lag(around 2GB for 1k TPS environment) in t= he=C2=A0remote=C2=A0 =C2=A0replication=C2=A0slot and another same data center=C2=A0server=C2=A0slot with 0 lag.

My observation:
<= font face=3D"arial, sans-serif">
1) Noticed pg_stat_replication_slot=C2= =A0total_txn reduced from 1k to 5 or 6 but other=C2=A0 slot is same with 1k= TPS
2)And noticed lag for=C2=A0remote= =C2=A0slot but fine with same data center
3) Most importantly=C2=A0I hav= e plenty of Bandwidth available in n/w ,2GB is still freely available=C2=A0= 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?=C2=A0At Least=C2=A0how the=C2=A0logical=C2=A0de= coding=C2=A0total_txn is counting the view pg_stat_replication_slot?

--
Thanks & Regards,
R= am.
--0000000000007be5140616c6d8e5--