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 1vixKT-002PFy-0b for pgsql-general@arkaria.postgresql.org; Thu, 22 Jan 2026 16:14:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vixKS-00DXxm-0w for pgsql-general@arkaria.postgresql.org; Thu, 22 Jan 2026 16:14:40 +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 1virny-00CTAE-0Y for pgsql-general@lists.postgresql.org; Thu, 22 Jan 2026 10:20:46 +0000 Received: from forwardcorp1d.mail.yandex.net ([178.154.239.200]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1virnv-001ssl-2e for pgsql-general@lists.postgresql.org; Thu, 22 Jan 2026 10:20:46 +0000 Received: from mail-nwsmtp-smtp-corp-main-80.iva.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-80.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:5c05:0:640:ff67:0]) by forwardcorp1d.mail.yandex.net (Yandex) with ESMTPS id 4562F80622 for ; Thu, 22 Jan 2026 13:20:42 +0300 (MSK) Received: from smtpclient.apple (unknown [2a02:6bf:8080:18b::1:1b]) by mail-nwsmtp-smtp-corp-main-80.iva.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id fKZKpe2BG0U0-bbYmmggI; Thu, 22 Jan 2026 13:20:42 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1769077242; bh=0UQBL3wLRjhPJJVpgHB5vwe/08HAhorSzdnADCVVtoo=; h=Date:Message-Id:To:From:Subject; b=HvpxOzSs7nYBUVPKHcHXPd7fbmX5rLWaO8ljNSizjzOZILPGee7NBBZgFNsnMbIwG Q+da72cZVJ1vMY9V5zX47BtaErKZSvQApVLlS5hzEBWEoiXsl3BO+hQCWt3GhDBaiw QAa9ftKbB3kRiLVKNtEHSqvAcdq40/nZeElCXmmI= Authentication-Results: mail-nwsmtp-smtp-corp-main-80.iva.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru From: Andrei Krylosov Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.4\)) Subject: =?utf-8?Q?=5BTool=5D_pg-status_=E2=80=94_lightweight_microservice?= =?utf-8?Q?_for_checking_PostgreSQL_host_status?= Message-Id: Date: Thu, 22 Jan 2026 13:20:31 +0300 To: pgsql-general@lists.postgresql.org X-Mailer: Apple Mail (2.3826.700.81.1.4) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi all! I'd like to share a small open=E2=80=91source project I've been working = on: [pg-status](https://github.com/krylosov-aa/pg-status). pg-status is a lightweight microservice (sidecar) that helps you = instantly determine the status of your PostgreSQL hosts: whether they = are alive, which one is the master, which ones are replicas, and how far = each replica is lagging behind the master. It's designed to run alongside your main application. It's lightweight, = resource=E2=80=91efficient, and delivers high performance. You can query = it on every request without noticeable overhead. pg-status polls your database hosts in the background at a configurable = interval and exposes an HTTP interface that you can use to retrieve = hosts matching given conditions. I originally built it to speed up master detection in a multi=E2=80=91host= setup where DNS failover was too slow, but it's also handy for proxy = setups or custom load=E2=80=91balancing logic. More information is available on GitHub: = https://github.com/krylosov-aa/pg-status Feedback and discussion are very welcome. I'd love to hear your = thoughts! Best regards, =20 Andrei Krylosov