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 1s5OHB-0058f6-KP for pgsql-general@arkaria.postgresql.org; Fri, 10 May 2024 11:18:57 +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 1s5OH9-00Dhd1-Oc for pgsql-general@arkaria.postgresql.org; Fri, 10 May 2024 11:18:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s5OH9-00Dhct-71 for pgsql-general@lists.postgresql.org; Fri, 10 May 2024 11:18:55 +0000 Received: from mail-am6eur05on2114.outbound.protection.outlook.com ([40.107.22.114] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s5OH6-000KA7-Eg for pgsql-general@lists.postgresql.org; Fri, 10 May 2024 11:18:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I7HPhVQANvahnI8TsIuets6UKEzUSI4TbObv6zr8+3jh+eO70IpWkpNI+2lT/ltCKfDsjzDyV1W9YFzHloaJriAVCRNY9mYwb7T+zTPtKPsRFjv7FPkeX+rW+D404+7TyOgelqlwZW0/IMb8bZ0qvXXIbdGKDq2lcdF4A3hSoPPw/zAiai+fOilPwyTJW0C10vV6xJsomzoYPlLulqN30YftOSpXKoG88xeUiu53EEJFD+asGWyDMuPlLLcuh0BMVGyym+D1nYnbJ53Psofne1gyxlmRvUBfVVFkSn1WktZHKPgCw6w9qSsn4/e9YxadBAgTQ/hJAYgUt77U9Ui5Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=teqY9juckcMh89iUIG6yR+nRZp98Tvw+YCcxVQmO/t0=; b=aMvb8CktZN8kTAd6ngD/7Pu9hJ65kua1gyxr8JJp5HDN2PiRzCFwAJpIvgQkRwCI4b9iGDNBF31X6N3u5P2pJ05xdf2PFgFheIqQOTjGpw8krhplM2Ql3+jWTLw/a+gciyuWmS4AirXTLL32Zm1RJ3dGlgqiAIqDuP3frMgRcU7mGhPV983U+ZOHzPxSNsbReeRu3yqpJ5zHRv5KEBOxa2uiFce4OOVVhFDjkrJlhKkp6UQWUMnuqm+3/XVgb+MiqTcou8OEs5Q01soyWA02awmF66TXRmqJAkk0mZfykZCSCmBkE7j8vi6Z9RbppMURAq1f4cRziEGepC/rwMi+cA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=gilat.com; dmarc=pass action=none header.from=gilat.com; dkim=pass header.d=gilat.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gilat.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=teqY9juckcMh89iUIG6yR+nRZp98Tvw+YCcxVQmO/t0=; b=p/8IpzMiDUniB0epl4P1d1D1iJkXNYHHKFyiFSaYXCJIIJgJO+Rkzl1oJ2BYZXaiUz2D7LxiHUlJnl1f2kHOu43T5sFqGCc37sO053BvYAi3QnpM/NZF8qF+0xLOSzDRCjIjVezyLH4GxitmWsGIiJxKb6JY0qtZ6jlXESBnJZQ= Received: from DB9PR07MB7180.eurprd07.prod.outlook.com (2603:10a6:10:215::5) by DU2PR07MB8254.eurprd07.prod.outlook.com (2603:10a6:10:277::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.49; Fri, 10 May 2024 11:18:48 +0000 Received: from DB9PR07MB7180.eurprd07.prod.outlook.com ([fe80::270e:36ee:e6c1:1c92]) by DB9PR07MB7180.eurprd07.prod.outlook.com ([fe80::270e:36ee:e6c1:1c92%4]) with mapi id 15.20.7544.048; Fri, 10 May 2024 11:18:48 +0000 From: Avi Weinberg To: pgsql-generallists.postgresql.org Subject: Scenarios that Replication Slot will be Marked as Active = false Thread-Topic: Scenarios that Replication Slot will be Marked as Active = false Thread-Index: AdqiylWLAwWu8JAfScytkEJWcwacmg== Date: Fri, 10 May 2024 11:18:48 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=gilat.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DB9PR07MB7180:EE_|DU2PR07MB8254:EE_ x-ms-office365-filtering-correlation-id: a08a8ffd-b3f2-4ad4-2f0d-08dc70e2f6ac x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230031|366007|376005|1800799015|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?MwFaYkOWvL6ngEhkKeGWMMCb0BTEIhyBVVU7eq7ygrSLMQhyR/NKtNJcC1tR?= =?us-ascii?Q?8Eh3nCKSknkMx8ZKDD44lpxP0FIwi/F3OzTUrumSgHQyAaKIblk5dtXN2FnF?= =?us-ascii?Q?X4xmXHwKDYFUC4DMgC0t48YXrVVqYSdRIn5syJhEr96UM53bZy1YiUhy7OKI?= =?us-ascii?Q?hH46Xl/3x/9ecIJB409WWKv3bXOjrV0bMl1sPhOHFQ8D4nPjkLoyMggOVpyV?= =?us-ascii?Q?/2tber9pwqApjv+myiECrX0JBiiZu+Ww4N7D4t6yuyrEYNiIN7a94NdqPXYq?= =?us-ascii?Q?c++AMtGv0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ipb/vTT?= =?us-ascii?Q?sLMuNEgdlbVkIblD5y5UfAf+BAE9Xivf+4EWzzIGy7Fp99ANs0mVKO2aIzKD?= =?us-ascii?Q?o1UNBubxUFeDGC0Rr84gWN7cwnsArYhOHOXZry0MQGXGe5PMdemSd2vssdRC?= =?us-ascii?Q?FEUp4YAULD6eiUg40GOEil5t?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR07MB7180.eurprd07.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(1800799015)(38070700009);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?YAd6WDnJdLgsef8t7s1L4Io6K9/MqOuMAF+ZAHTEsgFf2MuQwDIxg3EWGlOj?= =?us-ascii?Q?/hw/FxET1ANLfKJpGb9m4vOaDtv5vlTF44wC29JlKgmsXOALbzzdIzTXxmm9?= =?us-ascii?Q?YR9FJumQ+Gx3+QIgkD+XZ6bEdRwY5dIyk30XBhe0o/Bxa0ELge6WwKWl2duN?= =?us-ascii?Q?ZeBunBFamzxcMbl/W84rDw9tBUU8d+ILzCPgkA1CrBdLmtxy80icWWZBylKg?= =?us-ascii?Q?GHuWOKm5cmkhsaFNrKc5mZfOQ8p5KbsFt10xGe8pxWwqUJkflbP/fWkQ66lb?= =?us-ascii?Q?hNJRMABdD7kpk/8fRdAWAP3nSf+/4ugFbQtQoihN+qR1Cx4abjes6xb04x/J?= =?us-ascii?Q?0jVkdKMRzVvcl9H6j8e22QYv5PPQxh/yyvOn6yRTaHmmKyhPUpBPdeKlfdGJ?= =?us-ascii?Q?KEB8/NU69jUgDCHUj/Kc5elgxZFK71kQjY+g8A3h2R3No5sXOzrhIdCZJI4O?= =?us-ascii?Q?297QtTwPmzvWb956Mhnx7DoLVcE+mviIfMu5mTRd/aECer8AB32dlYjLzDcU?= =?us-ascii?Q?dw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UrHsFaunK7JVsYTpiQUN2QwW5?= =?us-ascii?Q?sPWZfAiYP7dcuYtV8u8hZ5zSj0XvnqpVBfi9C56diqYUOEu3PPJ8EhE6ji8N?= =?us-ascii?Q?nDhdYDx/Wr8mM/d4BpL5P6/wEFA++1Xz0ePaKn//uztIIo9QtD1XbrjOMSeN?= =?us-ascii?Q?3KYLHZdXRLkW3AVtmBU=3D?= Content-Type: multipart/alternative; boundary="_000_DB9PR07MB7180A945D1BD820B838B6E06CBE72DB9PR07MB7180eurp_" MIME-Version: 1.0 X-OriginatorOrg: gilat.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DB9PR07MB7180.eurprd07.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a08a8ffd-b3f2-4ad4-2f0d-08dc70e2f6ac X-MS-Exchange-CrossTenant-originalarrivaltime: 10 May 2024 11:18:48.2606 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 7300b1a3-573a-4010-92a6-1c65cd85e927 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Zu6Ely6mq0/QRFF+kYJFBXVny3z2uXCeAywgiDwMKz1HsNH27RrHVp2PIJzi9uFJ X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR07MB8254 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_DB9PR07MB7180A945D1BD820B838B6E06CBE72DB9PR07MB7180eurp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Experts, I would like to write a monitoring script that will check logical replicati= on running on our setup. For that I would like to know when to alert when = I see that replication slot is marked as active=3D false. I will probably = need to know when it is a temporary state that I need to wait before I aler= t and when to alert immediately when I see the slot is inactive. If the replication slot falls behind the primary server will it be marked a= s Active =3D false until the replica catches up? If so, can the lag size b= e configured that only if it crosses the threshold it will be marked as in= active. Will failure in the replica affect the active status of its replication slo= t? What are other scenarios that can cause it to be inactive. Thanks! IMPORTANT - This email and any attachments is intended for the above named = addressee(s), and may contain information which is confidential or privileg= ed. If you are not the intended recipient, please inform the sender immedia= tely and delete this email: you should not copy or use this e-mail for any = purpose nor disclose its contents to any person. --_000_DB9PR07MB7180A945D1BD820B838B6E06CBE72DB9PR07MB7180eurp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi Experts,

 

I would like to write a monitoring script that will check logical re= plication running on our setup.  For that I would like to know when to= alert when I see that replication slot is marked as active=3D false.  I will probably need to know when it is a= temporary state that I need to wait before I alert and when to alert immed= iately when I see the slot is inactive.

 

If the replication slot falls behind the primary server will it be mar= ked as Active =3D false until the replica catches up?  If so, can the lag size be configured that only if it cr= osses the threshold it  will be marked as inactive.<= /p>

 

Will failure in the replica affect the active status of its replicatio= n slot?

 

What are other scenarios that can cause it to be inactive.<= /span>

 

Thanks!

 

 

IMPORTANT - This email and any attachments is intended for the above named = addressee(s), and may contain information which is confidential or privileg= ed. If you are not the intended recipient, please inform the sender immedia= tely and delete this email: you should not copy or use this e-mail for any purpose nor disclose its conten= ts to any person. --_000_DB9PR07MB7180A945D1BD820B838B6E06CBE72DB9PR07MB7180eurp_--