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.96) (envelope-from ) id 1veElB-00Af9e-0L for pgsql-admin@arkaria.postgresql.org; Fri, 09 Jan 2026 15:50:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1veEl9-007jTL-3C for pgsql-admin@arkaria.postgresql.org; Fri, 09 Jan 2026 15:50:44 +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.96) (envelope-from ) id 1veEl9-007jTC-20 for pgsql-admin@lists.postgresql.org; Fri, 09 Jan 2026 15:50:44 +0000 Received: from mail-oo1-xc31.google.com ([2607:f8b0:4864:20::c31]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1veEl7-005UUr-2u for pgsql-admin@lists.postgresql.org; Fri, 09 Jan 2026 15:50:43 +0000 Received: by mail-oo1-xc31.google.com with SMTP id 006d021491bc7-65b6b69baf8so1498019eaf.3 for ; Fri, 09 Jan 2026 07:50:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767973840; x=1768578640; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=XbIjD5IyEta0MNoI2t54YVR9LCe9A/fGxdLE+w98O90=; b=T+i71IaIvx0C3/ZGoXxZpqg50sFOzJgoZbn6ojDVp5sjebdD0jtMZgm41MaGldOKcK 0Ie19MpVlkpUrAW574z++6Nf1n3LYcYLXamqvbdEvVAWjxgfnVftMM4DlALLA/waXA6N gb4TKPIauI1fUys0jI/aTMOAOMw852i6kyP1pD8CwBclDAhGcmCLh08vV1ioljBwwgLy 9GMdy8UuNMPx5Ap5MDMCczQD0vTN3gVHRPNqKCQ+usiFLn0pvzFqitdOGZG0HEGy775z mxvNz6Zeh4ysR5l+89lZM3Wt1ko2vqHFX4R/nZS5kmUAqkdgP00/2uBdJ8AMaqADOJ0A scDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767973840; x=1768578640; h=to:subject:message-id:date:from:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XbIjD5IyEta0MNoI2t54YVR9LCe9A/fGxdLE+w98O90=; b=YqCBehsep4XGO2GGgg83dyBheUVuqSL47nb9nskgz9cxtlS3bFINKYvjnqIOXQ3WC2 t3QPcgZZr0quxElYSeaeIwZWi60BhBS02vRU/gNhgbkPN1wbnTi52UyDdGgjDClVA8ct ygCxUUwx+kTcKumY740FSWK7Z0sSqnSq/TbWFn+jw2SzBxa8rHp2PW/u+QpFaHTWqDtk 4NGUCSrjOPuRjmP18ReZkBabSYLqtylcXBRDsvRJ0ebgqWSBGyCW5/zMe23x1pljdy7x zf6VzMK62BabSpTTDDWSKEbl+lGy3xrx1ybrpaa5Mxn6723i3tV/s/19XE8xaCBJUDN1 wz1Q== X-Gm-Message-State: AOJu0YwBaaeLqDrz/17Avx693zFBeJA2XQaQ0taRr4J6zLU+Qy49ixMx blhpE5AwgukfbS61vARSTbDkzdYoAcXGqBGjoBoZEaZLPz7/mgC5PtqtMRL7R2Fzxt28MxA0HTL 0REHhV1SZ9HMjc7lU8Rk1iWlxmj4F2FeA7HuW X-Gm-Gg: AY/fxX6cQ/vE1S68aPQ1qtmJg4CiasVAfwdAc8wzZqjRGuPwMl5xVwz06295UuajSwc 7fWpXyusj90c7IhQDDnV2NrdW7L0vXmInHDe/vI9meJrL/SOTC9UZFOOqPY05Z8qTehZ1FQqpR8 PZJpCT+kPT0UtxN4wrRlyOz/Fx1BtuEQ7p9CGBq/9J1OI2CYu2LneCkkxq2y/NM7aOXPQ//ekdA Qu73YZ7spYra/ZqvNb2cC9e8+rM//vpStzCJ6JUm6Bor0WgVjbR3U37kwU+xWbSldfo2wHD X-Google-Smtp-Source: AGHT+IGkE4rOcf44dKa/wFGs8VWpXlh2I272fZ6F5wQvrgGseYj/SQIEkibR+gJJhdQm6Q+iokzLNRK5CnzDsrxQIHs= X-Received: by 2002:a05:6820:62a:b0:65b:35d7:bb81 with SMTP id 006d021491bc7-65f54f5a6b6mr5322458eaf.38.1767973839780; Fri, 09 Jan 2026 07:50:39 -0800 (PST) MIME-Version: 1.0 From: Ron Johnson Date: Fri, 9 Jan 2026 10:50:28 -0500 X-Gm-Features: AZwV_QgQN1t-tehOHixUgGUQ57ce6Ed_wFpzrqn-IpyTmHHw0BrFaGEs7P0Ox0A Message-ID: Subject: Better way to monitor for failed replication? To: Pgsql-admin Content-Type: multipart/alternative; boundary="000000000000b13f550647f67cbc" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000b13f550647f67cbc Content-Type: text/plain; charset="UTF-8" Currently, in a bash script, I run this SELECT statement against the Primary server which is supposed to replicate to multiple servers. If active == f, I send an alter email. postgres=# SELECT rs.slot_name, rs.active, sr.client_hostname from pg_replication_slots rs left outer join pg_stat_replication sr on rs.active_pid = sr.pid; slot_name | active | client_hostname --------------+--------+----------------- pgstandby1 | t | BBOPITCPGS302B replicate_dr | f | (2 rows) Is there a better way to check for replication that's supposed to be happening, but isn't (like PG on the replica was stopped for some reason)? -- Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --000000000000b13f550647f67cbc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Currently, in a bash script, I run this SELECT statem= ent against the Primary server which is supposed to=C2=A0replicate=C2=A0to = multiple servers.=C2=A0 If active =3D=3D f, I send an alter email.

postgres=3D# SELECT rs.slot_name,= rs.active, sr.client_hostname
fr= om pg_replication_slots rs
=C2=A0 =C2=A0 left outer join pg_stat_replic= ation sr on rs.active_pid =3D sr.pid;
=C2=A0 slot_name =C2=A0 | active |= client_hostname
--------------+--------+-----------------
=C2=A0pgs= tandby1 =C2=A0 | t =C2=A0 =C2=A0 =C2=A0| BBOPITCPGS302B
=C2=A0replicate_= dr | f =C2=A0 =C2=A0 =C2=A0|
(2 rows)

I= s there a better way to check=C2=A0for replication that's supposed to b= e happening, but isn't (like PG on the replica was stopped for some rea= son)?

-- =
Death to <Redacted>, and butter sauce.
Do= n't boil me, I'm still alive.
<Redacted> lobster= !
--000000000000b13f550647f67cbc--