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 1tb1z1-007NhP-Dk for pgsql-general@arkaria.postgresql.org; Thu, 23 Jan 2025 18:31:16 +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 1tb1z0-0024FQ-EP for pgsql-general@arkaria.postgresql.org; Thu, 23 Jan 2025 18:31:14 +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 1tb1wK-001yXV-QY for pgsql-general@lists.postgresql.org; Thu, 23 Jan 2025 18:28:29 +0000 Received: from fhigh-a1-smtp.messagingengine.com ([103.168.172.152]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tb1wH-00181x-16 for pgsql-general@lists.postgresql.org; Thu, 23 Jan 2025 18:28:28 +0000 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 626301140205; Thu, 23 Jan 2025 13:28:23 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Thu, 23 Jan 2025 13:28:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1737656903; x=1737743303; bh=TFvBenJkvpzB9tVCoFXdUba92Q8AE682mTTZdMzbwB4=; b= O++FflCHjM0axpNNV0urA6BumyTXUhXm47DQqK/d3TbCjjmNA4fkof3OoxIUS1Cd cQmzz/XeeZXkUwKRudc++CWKFICXAkYESuakUDtrhrQOf6X1njMaE2LiAqGyaB0L WnC0e3YU4np80y10YLK3qx2zhtnPN32aIvmx54qVvWSyeGbMARUpncBpHOvvaTjJ qg9BvxWjjeyg1yE/Jnic2lPMh5LEqi4rPMUpZ4kdLkcezRZhWk97xW3qhj3CK/Tv YmrDdOsqXlhELs/eUt+DFg/s/sfPKNTSvUSSwRTVK+shhAPtu+fyfBcbN6/a4roE XJg1WV9JPguutT1K+TBfKg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1737656903; x= 1737743303; bh=TFvBenJkvpzB9tVCoFXdUba92Q8AE682mTTZdMzbwB4=; b=S MKsp40NYmJ+VFmdGkuHtckbekoP1es0YDRPaQO/MuVOguJsP9tNwYgOK/hFB45yN VT9TUZ6w0rvDkZ3egbY27JWc7uZXWpMZdrHQ+Y95HGwdUnXLthhYoPV+BjrmEpJe sOEIAg19KdCfogYt+wZiT7ta3p4DacJfJoo6m1cVApuv3qKXuUX6yjBXO+w0JbPv wGnlQfiAWasknrsOA+9s7ClQl8O4UkL0ppzdWEwrLhx3cmiqiWtiSa+/tdDxnqp+ 5gK6Sm4+BFXROPXiT81Jlgkad3QmN2d7oGB3MNmVZtY1Rn3Ru0HvHx3sVWNYfVyD AOps3evVv+f2vRL5W357g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejgedgvdefkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgg gfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughrihgrnhcumfhlrghv vghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrf grthhtvghrnhepfeegfeeiuedtgffgteeggfehkeejheetieeliefgteeikeejvdeiveei gfehvedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnhgspghrtghpthht ohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepmhgrhhgvshhhphhoshhtgh hrvghsleesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghl sehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Jan 2025 13:28:22 -0500 (EST) Message-ID: <7544dd46-c11a-43b4-bb70-85ccbbed382f@aklaver.com> Date: Thu, 23 Jan 2025 10:28:22 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Records count mismatch with logical replication To: Durgamahesh Manne Cc: pgsql-general References: <79b7d5dc-3a1d-4ef0-9a3d-055268dc7d09@aklaver.com> <3691ad0c-189c-4290-a434-e03cb6301cac@aklaver.com> <44e3ca5d-fcbd-4f96-a6a6-09becff15cd7@aklaver.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/23/25 09:54, Durgamahesh Manne wrote: See comments in line below. > > Source Publication Side: > archiving=> select * from pg_stat_replication; There is missing information here. Am I right in assuming this is for slot cls_eva_msa? And that it going to same client_addr 10.80.0.168? > client_hostname  | > client_port      | 52506 > backend_start    | 2025-01-23 16:58:04.697304+00 > backend_xmin     | > state            | streaming > sent_lsn         | 16C7/BDE4BB48 > write_lsn        | 16C7/BDE4BB48 > flush_lsn        | 16C7/BDE4BB48 > replay_lsn       | 16C7/BDE4BB48 > write_lag        | 00:00:00.002271 > flush_lag        | 00:00:00.002271 > replay_lag       | 00:00:00.002271 > sync_priority    | 0 > sync_state       | async > reply_time       | 2025-01-23 17:34:39.901979+00 > -[ RECORD 2 ]----+------------------------------ > pid              | 3501 > usesysid         | 14604130 > usename          | archiving > application_name | cle_clm_mka > client_addr      | 10.80.0.168 > client_hostname  | > client_port      | 55412 > backend_start    | 2025-01-22 09:31:11.83963+00 > backend_xmin     | > state            | streaming > sent_lsn         | 16C7/BDE4BB48 > write_lsn        | 16C7/BDE4BB48 > flush_lsn        | 16C7/BDE4BB48 > replay_lsn       | 16C7/BDE4BB48 > write_lag        | 00:00:00.001642 > flush_lag        | 00:00:00.023143 > replay_lag       | 00:00:00.001642 > sync_priority    | 0 > sync_state       | async > reply_time       | 2025-01-23 17:34:39.903052+00 The lag times are minimal. Where the queries done below done at later time then those above? > Subscription Side : archiving=> select * from pg_stat_subscription where > subname = 'cls_eva_msa'; > -[ RECORD 1 ]---------+------------------------------ > subid                 | 1936652827 > subname               | cls_eva_msa > pid                   | 18746 > relid                 | > received_lsn          | 16C7/FB48DFE0 > last_msg_send_time    | 2025-01-23 17:41:11.924562+00 > last_msg_receipt_time | 2025-01-23 17:41:11.933344+00 > latest_end_lsn        | 16C7/FB48DFE0 > latest_end_time       | 2025-01-23 17:41:11.924562+00 > > archiving=> select * from pg_stat_subscription where subname = > 'cle_clm_mka'; > -[ RECORD 1 ]---------+------------------------------ > subid                 | 1892055116 > subname               | cle_clm_mka > pid                   | 507 > relid                 | > received_lsn          | 16C7/FB8CDF68 > last_msg_send_time    | 2025-01-23 17:41:17.375879+00 > last_msg_receipt_time | 2025-01-23 17:41:17.378932+00 > latest_end_lsn        | 16C7/FB8CDF68 > latest_end_time       | 2025-01-23 17:41:17.375879+00 > > '... everything looks good' is an opinion not actual data. > Correct So what does the AWS dashboard show for the I/0 between the servers? > > Regards > Durga Mahesh -- Adrian Klaver adrian.klaver@aklaver.com