惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

TaoSecurity Blog
TaoSecurity Blog
小众软件
小众软件
Webroot Blog
Webroot Blog
T
Tor Project blog
Martin Fowler
Martin Fowler
T
The Blog of Author Tim Ferriss
The Register - Security
The Register - Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
Project Zero
Project Zero
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
CXSECURITY Database RSS Feed - CXSecurity.com
罗磊的独立博客
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
D
DataBreaches.Net
N
News | PayPal Newsroom
S
Security @ Cisco Blogs
S
SegmentFault 最新的问题
G
Google Developers Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
MongoDB | Blog
MongoDB | Blog
博客园 - 【当耐特】
MyScale Blog
MyScale Blog
有赞技术团队
有赞技术团队
L
LangChain Blog
P
Proofpoint News Feed
博客园_首页
AWS News Blog
AWS News Blog
W
WeLiveSecurity
T
Tenable Blog
T
Threat Research - Cisco Blogs
N
News and Events Feed by Topic
月光博客
月光博客
B
Blog RSS Feed
C
Cyber Attacks, Cyber Crime and Cyber Security
GbyAI
GbyAI
Know Your Adversary
Know Your Adversary
宝玉的分享
宝玉的分享
爱范儿
爱范儿
L
Lohrmann on Cybersecurity
AI
AI
Latest news
Latest news
Vercel News
Vercel News
P
Proofpoint News Feed
大猫的无限游戏
大猫的无限游戏
S
Secure Thoughts

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店 GitHub - EdoardoBambini/Agent-Armor-Iaga: AI agents are getting tool access — shell, file system, databases, APIs, secrets. But **nobody is governing what they actually do with it**. Frameworks like LangChain, CrewAI, AutoGen, and Claude Code give agents the power to execute. Agent Armor gives you the power to control, audit, and approve every single action before it happens. HN Vibes — Week 15, Apr 7–13 2026 GitHub - chojs23/ec: Easy terminal-native 3-way git mergetool vim-like workflow GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - JakOb-dotcom/cloud-sandbox-security-analysis: Technical analysis and Proof of Concept (PoC) regarding environment variable exfiltration in containerized cloud sandboxes via side-channel data leaks. Springboards - Flint Alpha Show HN: A simpler coding agent harness GitHub - audiodude/sudomake-friends GitHub - 256thFission/mini-mythos: OSS clone of Anthropic’s Mythos harness to locate C/C++ memory vulnerabilities Show HN: OpenParallax: OS-level privilege separation for AI agent execution Hacker News Sorted - Chrome 应用商店 Show HN: How to Install Docker on Ubuntu 24.04 LTS: Complete 2026 Guide GitHub - himanshudongre/smriti GitHub - sverrirsig/claude-control: macOS desktop dashboard for monitoring and managing multiple Claude Code sessions GitHub - ory/dockertest: Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work. Chiral - Chrome 应用商店 Show HN: Two Claudes collaborating through shared memory on a $100 mini-PC GitHub - pmichaillat/latex-cv: Minimalist LaTeX template for academic CVs GitHub - oguzbilgic/posse: A web UI for Anthropic Managed Agents. GitHub - sshiraz/depsly: Dependency risk analysis tool for npm packages ABI Add safari/agent-harness — Safari browser automation via safari-mcp by achiya-automation · Pull Request #212 · HKUDS/CLI-Anything GitHub - Halfblood-Prince/trustcheck: Verify PyPI package attestations and improve Python supply-chain security GitHub - oguzbilgic/kern-ai: Agents that do the work and show it. GitHub - bruits/satteri: High-performance Markdown and MDX processing for the JavaScript ecosystem GitHub - tylergibbs1/feedstock: High-performance web crawler and scraper for TypeScript, powered by Bun and Playwright GitHub - Grimm67123/grimmbot: The self-improving sandboxed and open-source AI agent. With persistent memory and scheduling. GitHub - whitevanillaskies/whitebloom: Local whiteboard that blooms. GitHub - hwdsl2/docker-whisper: Docker image for a self-hosted Whisper speech-to-text server with speaker diarization and OpenAI-compatible transcription and translation APIs. Powered by faster-whisper. Supports all Whisper models, NVIDIA GPU (CUDA) acceleration, JSON/SRT/VTT output, SSE streaming, offline mode, and multi-arch (amd64, arm64). GitHub - yisding/reviewwiggum GitHub - MarwanAlsoltany/serrors: Structured errors for Go: sentinel hierarchies, typed data, custom formatting, and slog integration. GitHub - soatok/age-php GitHub - Luthiraa/markitme GitHub - stagas/rtdiff: realtime git diff gui and AI-assisted commits GitHub - tombedor/excalicharts GitHub - wh1le/excalidraw-edit: Open and edit .excalidraw files from the terminal. Offline, auto-saves to disk. MalExt Sentry - Malicious Extension Scanner - Chrome 应用商店 GitHub - syi0808/asciianimesvg: Generate animated ASCII art SVGs from text. CLI, Rust library, WASM, and web editor. GitHub - zaina-ml/ml_forge: A visual-based graph node editor for training computer vision models. GitHub - anakin87/llm-rl-environments-lil-course: 🌱 A little course on Reinforcement Learning Environments for evaluating and training Language Models GitHub - takaakit/superpowers-uml: Superpowers-UML modifies Superpowers to ensure a software development workflow in which AI agents design through UML modeling. AdriByte Studio - Sviluppo Web e Soluzioni Digitali GitHub - chouligi/angel-copilot: Your personalized Angel Investment Advisor Show HN: MoodSense AI (ML and FastAPI and Gradio, Deployed on Hugging Face) Moodsense Ai - a Hugging Face Space by aman179102 GitHub - agenteractai/lodmem: Level Of Detail Context Management for Agents GitHub - ostefani/subnetlens: A fast, concurrent network scanner with a TUI and plain-text CLI, built in Go. It discovers live hosts on your network, scans their open ports, resolves hostnames, and fingerprints operating systems—delivered. Cyber Pulse: Agentic Intel - Apps on Google Play Whisper API: Self-Hostable Speech to Text Transcription The Agent-Web Protocol Stack: A Research Thesis GitHub - msmarkgu/RelayFreeLLM: A restful API designed to route user prompts to various AI model providers. Show HN: Provepy – A Python decorator that proves your code using Lean and LLMs Show HN: Pardonned.com – A searchable database of US Pardons GitHub - patrickdappollonio/dux: Dux is a terminal UI that lets you run multiple AI coding agents side by side, each in its own git worktree, with full companion terminals, macros, commit generation, and a command palette that knows more tricks than you do. kMC Crystal Simulator Show HN: HyperFlow – A self-improving agent framework built on LangGraph GitHub - stef41/vibescore: 🎵 Grade your vibe-coded project. One command, instant letter grade across security, quality, dependencies, and testing. GitHub - stef41/lmscan: 🔍 Detect AI-generated text and fingerprint which LLM wrote it. Open-source GPTZero alternative. Zero dependencies, works offline. imgur.com GitHub - visionscaper/collabmem: Enabling long-term collaboration with Agentic AI - building up episodic and world model memory over time with in-context awareness 在 Steam 上购买 FriedrichAI: Offline AI 立省 10% GitHub - atripati/ark: AI Runtime Kernel — a context operating system for AI agents. Eliminates tool bloat, loads only what’s needed, and gives LLMs their reasoning space back. GitHub - nowork-studio/toprank: Open-source Claude Code skills for SEO, SEM, Google Ads GitHub - tacomanator/sash: Lightweight macOS menu bar app for reliably cycling through windows of the current application. Appents | Social Media Management for Product-First Teams GitHub - pnhoang/youtube-spam-blocker: Automatically detects and hides spam messages in YouTube Live chat. Set rate limits, keyword filters, and block repeat offenders. GitHub - decisionnode/DecisionNode: CLI + Local MCP - A shared structured memory store across Claude Code, Cursor, Windsurf, Antigravity, and every MCP client. Semantically queryable. GitHub - AvaCodeSolutions/django-email-learning: An open source Django app for creating email-based learning platforms with IMAP integration and React frontend components. The $100K Gap in Kubernetes Security Tooling Function Calling Harness: From 6.75% to 100%
GitHub - krylosov-aa/pg-status: A microservice (sidecar) that helps instantly determine the status of your PostgreSQL hosts including whether they are alive, which one is the master, which ones are replicas, and how far each replica is lagging behind the master.
krylosov-aa · 2026-06-15 · via Hacker News: Show HN

An extremely lightweight and fast microservice (sidecar) that helps instantly determine the status of your PostgreSQL hosts including 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 as a sidecar that runs alongside your main application. It’s lightweight, resource-efficient, and delivers high performance. You can access it on every request without noticeable overhead.

pg-status polls database hosts in the background at a specified interval and exposes an HTTP interface that can be used to retrieve a list of hosts meeting given conditions.

It always serves data directly from memory and responds extremely quickly, so it can be safely used on every request.

To learn more about why this project exists and what problem it solves, you can read the article about three PostgreSQL Master/Replica Discovery Problems

Usage

Run the application on the same host next to the main service or actually anywhere you want. After it starts, the HTTP API will be available.

API

The service provides several HTTP endpoints for retrieving host information.

All APIs support two response formats: plain text and JSON.

If you include the header Accept: application/json, the response will be in JSON format, for example: {"host": "localhost"}

If you omit this header, the response will be plain text: localhost

If the API cannot find a matching host, it will return a 404 status code. In this case, the response body will be empty for plain text mode, and {"host": null} for json mode.

Lag query parameters

The /replica, /sync_by_*, and /most_sync_by_bytes endpoints accept optional query parameters lag_ms and lag_bytes that override the lag thresholds for a single request. Values must be non-negative integers; otherwise the endpoint responds with HTTP 400 and a body like {"error_text": "Invalid lag_ms"}.

How a missing parameter is interpreted depends on the route:

  • /replica — a missing parameter means no constraint on that dimension. The global pg_status__sync_max_lag_* defaults are not applied here.
  • /sync_by_* and /most_sync_by_bytes — a missing parameter falls back to the global pg_status__sync_max_lag_ms / pg_status__sync_max_lag_bytes.

A /sync_by_time request only consults the time threshold and a /sync_by_bytes request only consults the byte threshold; passing the other parameter to those endpoints is silently ignored.

LSN query parameter (read-your-writes)

The /replica, /sync_by_*, and /most_sync_by_bytes endpoints also accept an optional min_lsn query parameter — a strict freshness filter that guarantees the chosen host has replayed at least up to a given WAL position. This is the primitive for read-your-writes consistency: instead of relying on lag_ms / lag_bytes heuristics, the caller supplies an exact LSN and pg-status only returns a replica that has caught up to it.

The value must be a PostgreSQL LSN in canonical HEX/HEX form (for example, 0/3000060). An invalid format produces HTTP 400 with {"error_text": "Invalid min_lsn"}. A missing parameter means no LSN constraint and stacks with the lag parameters described above.

If no replica has replayed to min_lsn, the master is returned as a fallback.

Read-your-writes pattern. After a write to the master, capture pg_current_wal_lsn() and pass it to the next read request:

INSERT INTO ...;
SELECT pg_current_wal_lsn();   -- returns e.g. "0/3000060"

# follow-up read is guaranteed to see the write:
GET /replica?min_lsn=0/3000060

Either a replica that has already replayed at least to 0/3000060 is returned, or the master is returned.

GET /master

Returns the host of the current master, if one exists. If no master is available, it returns null.

GET /replica

Returns the host of a replica, selected using the round-robin algorithm. Optional lag_ms, lag_bytes, and min_lsn query parameters constrain the result:

  • no parameters — any alive replica.
  • ?lag_ms=X — alive replicas with lag_ms ≤ X.
  • ?lag_bytes=Y — alive replicas with lag_bytes ≤ Y.
  • ?lag_ms=X&lag_bytes=Y — alive replicas with both lag_ms ≤ X AND lag_bytes ≤ Y.
  • ?min_lsn=X/Y — alive replicas that have replayed at least up to the given LSN (see "LSN query parameter" above). Composes with the lag filters.

If no replica matches, the master’s host is returned instead.

GET /sync_by_time

Returns the host of a replica (selected using the round-robin algorithm) considered time-synchronous — its time lag is less than or equal to the threshold. The threshold is the lag_ms query parameter if provided, otherwise pg_status__sync_max_lag_ms. If no replica meets this condition, the master’s host is returned.

GET /sync_by_bytes

Returns the host of a replica (selected using the round-robin algorithm) considered byte-synchronous — according to the WAL LSN, its lag is less than or equal to the threshold. The threshold is the lag_bytes query parameter if provided, otherwise pg_status__sync_max_lag_bytes. If no replica meets this condition, the master’s host is returned.

GET /sync_by_time_or_bytes

Returns the host of a replica (selected using the round-robin algorithm) that is considered synchronous either by time or by bytes. Per-request lag_ms / lag_bytes query parameters override the corresponding global thresholds for this request only. If no such replica exists, the master’s host is returned.

GET /sync_by_time_and_bytes

Returns the host of a replica (selected using the round-robin algorithm) that is considered synchronous by both time and bytes. Per-request lag_ms / lag_bytes query parameters override the corresponding global thresholds for this request only. If no such replica exists, the master’s host is returned.

GET /most_sync_by_bytes

Returns the host of the most byte-synchronous replica — the one with the smallest lag_bytes among replicas that still satisfy the time threshold. Unlike the /sync_by_* endpoints, this endpoint does not use round-robin: selection is deterministic (ties are broken by host order). Per-request lag_bytes query parameter overrides the global threshold for this request only. If no replica satisfies threshold, the master’s host is returned.

GET /hosts

Returns a list of all hosts with their status information in json format. The sync_by_time / sync_by_bytes flags reflect the current lag against the global pg_status__sync_max_lag_* thresholds. For a dead host (alive: false), the lag fields are null and the sync flags are omitted.

The lsn field is the host's latest known WAL position as of the last successful poll: pg_current_wal_lsn() on the master, pg_last_wal_replay_lsn() on a replica. It is null for dead hosts.

For example:

[
  {
    "host": "host-1",
    "master": true,
    "alive": true,
    "lag_ms": 0,
    "sync_by_time": true,
    "lag_bytes": 0,
    "sync_by_bytes": true,
    "lsn": "0/3000060"
  },
  {
    "host": "host-2",
    "master": false,
    "alive": true,
    "lag_ms": 6193,
    "sync_by_time": false,
    "lag_bytes": 456,
    "sync_by_bytes": true,
    "lsn": "0/2FFFE98"
  },
  {
    "host": "host-3",
    "master": false,
    "alive": false,
    "lag_ms": null,
    "sync_by_time": false,
    "lag_bytes": null,
    "sync_by_bytes": false,
    "lsn": null
  }
]

GET /status

Returns status of a host that you specified in the host query parameter. If the host parameter is missing, the endpoint responds with HTTP 400 and {"error_text": "Get parameter 'host' wasn't passed"}. If the host is not in the monitored list, a 404 is returned.

You can also use this API to poll pg-status to check if it has started up and is alive.

For example: http://127.0.0.1:8000/status?host=host-1

{
  "master": false,
  "alive": true,
  "lag_ms": 0,
  "sync_by_time": true,
  "lag_bytes": 0,
  "sync_by_bytes": true,
  "lsn": "0/3000060"
}

GET /version

Returns the pg-status semver

Parameters

You can configure various parameters using environment variables:

  • pg_status__pg_user — The user under which SQL queries to PostgreSQL will be executed. Default: postgres
  • pg_status__pg_password — The password for the PostgreSQL user. Default: postgres
  • pg_status__pg_database — The name of the database to connect to. Default: postgres
  • pg_status__hosts — A list of PostgreSQL hosts, separated by the ,.
  • pg_status__pg_port — The connection port. You can specify separate ports for individual hosts using the same delimiter. Default: 5432
  • pg_status__connect_timeout — The time limit (in seconds) for establishing a connection to PostgreSQL. Default: 2
  • pg_status__max_fails — The number of consecutive errors allowed when checking a host’s status before it is considered dead. Default: 3
  • pg_status__sleep_ms — The delay (in milliseconds) between consecutive host status checks. Default: 5000
  • pg_status__query_timeout_ms — Hard deadline (in milliseconds) for a single poll iteration of a host (connect + send + read). If the iteration does not complete in time, the connection is closed and the host's failure counter is incremented. Default: 5000
  • pg_status__conn_max_age_ms — Maximum age (in milliseconds) of a reused PostgreSQL connection. Connections older than this are closed and reopened on the next iteration so that stale connections do not stick around forever. Default: 300000 (5 minutes)
  • pg_status__sync_max_lag_ms — The maximum acceptable replication lag (in milliseconds) for a replica to still be considered time-synchronous. Default: 1000
  • pg_status__sync_max_lag_bytes — The maximum acceptable lag (in bytes) for a replica to still be considered byte-synchronous. Default: 1000000 (1 MB)
  • pg_status__http_port — the port on which the http server will listen. Default: 8000

Installation

In short there is:

For more information, go to the docs/installation.md section.

Performance

Memory - 9Mib

Depending on the API being called and the format selected (plain /master is the fastest, json /hosts is the slowest):

  • 0.1 CPU — Requests/sec: ~1600-2000
  • 1 CPU — Requests/sec: ~8600-9000

Detailed performance reports

Implementation Details

Concurrent polling

A single writer thread polls all hosts concurrently through libpq's non-blocking API and one poll() system call over their sockets. Each host runs its own independent iteration: a new poll is started every pg_status__sleep_ms after the previous one completed, and each iteration has a hard deadline of pg_status__query_timeout_ms (after which the connection is torn down and the host's failure counter is incremented).

This means a slow or hung host doesn't block updates for the other hosts — the rest of the cluster continues to refresh on its own cadence while the slow host waits for its own deadline.

Connection reuse

PostgreSQL connections are kept alive between polling iterations: opening a fresh PGconn on every iteration would mean a full TCP + auth handshake every pg_status__sleep_ms, which is wasteful and adds needless load on the server. Instead, each host keeps its connection open and reuses it.

To prevent a stale connection from sticking around forever (e.g. intermediate NAT state expiring, or server-side cleanup), each connection is recycled when its age exceeds pg_status__conn_max_age_ms. Connections are also closed and reopened on any query error or socket-level failure.

Consistency

Cross-host consistency is intentionally not provided.

There is one writer (the poll thread) and many readers (HTTP handlers). The design goal is that the writer never blocks the readers and the readers never block the writer.

Per-host data is published as a consistent snapshot via a seqlock on each host, so readers always see all fields from the same poll iteration of a single host.

But cross-host inconsistency is still permitted by design: at any given moment some hosts may already have data from their N-th iteration while others still have data from their (N−1)-th iteration. The size of this window is bounded by pg_status__query_timeout_ms. For this project, the fastest response time and the most up-to-date per-host data mattered more, so cross-host consistency was intentionally sacrificed.

Reaction speed to host unavailability

If a host doesn't respond to a request, it could mean either a temporary issue or that the host is actually down. To avoid marking a host as dead prematurely, a host is only considered dead after pg_status__max_fails attempts. A failing iteration aborts after at most pg_status__query_timeout_ms, so in the worst case a host transitions from healthy to dead in roughly pg_status__max_fails × pg_status__query_timeout_ms.

To speed up our reaction to possible host unavailability, if a host doesn't respond and the number of attempts hasn't yet exceeded pg_status__max_fails, we mark it as possibly dead, and this affects which hosts get returned:

  • If the current master is marked as possibly dead and there’s already a new master, we immediately switch to the new master.
  • When selecting a replica, preference is given to live hosts. However, if no live replicas meet a search criteria, a potentially dead replica will be returned. This means that for up to pg_status__max_fails attempts, the fairness of load balancing between replicas can be disrupted.

Split-brain

With the client-side master detection approach, there’s a problem: in the case of a split-brain scenario, we can’t reliably determine who "should" be master. In our case, the first alive master wins. The order is defined by pg_status__hosts.

Logging

The service writes to stdout and stderr. All errors, such as connection errors to pg hosts, are written to stderr.

Informational messages about service startup and shutdown are written to stdout.

More importantly, information about host status changes is written to stdout:

If a host fails a status check but has not yet exceeded pg_status__max_fails, the message will be: <host-name>: possible dead

If a host is confirmed dead (after pg_status__max_fails consecutive failures), the message will be: <host-name>: dead

If a host is revived or becomes a master after failover, the message will be: <host-name>: master

If a host is revived or becomes a replica after failover, the message will be: <host-name>: replica

For replicas, there are also messages about replica synchronicity against the global pg_status__sync_max_lag_* thresholds:

<host-name>: synchronous in time
<host-name>: out of sync in time
<host-name>: synchronous in bytes
<host-name>: out of sync in bytes

Testing the service

You can start the containers and test the application however you like.

make build_up

Builds the lightweight container using parameters defined in docker-compose.yml.

You can create a .env file using the provided example, or specify the required parameters directly in docker-compose.yml. This allows you to test the application with your own database setup.

make build_up_test

Builds the lightweight container with parameters defined in test/docker-compose.yml.

In addition to the main service, this setup launches two PostgreSQL instances: one acting as the master and the other as a replica. To simulate host failover or disconnection, proxy services are used. This approach allows you to test master-switch scenarios without actually stopping PostgreSQL — you can simply switch the proxy’s target instead.

Helper shell scripts are provided for this purpose:

Third‑party components

It uses the following third‑party components: