etcd
etcd v3 clients such as etcdctl and clientv3 connect to the pgetcd gateway over gRPC with mutual TLS. The
gateway evaluates each request in the pg_etcd extension. Keys, revisions, the event history and leases live in
PostgreSQL tables, and a response is sent only after a synchronous commit.
How etcd maps onto PostgreSQL
- Each request is one
READ COMMITTEDtransaction. It locks the singleetcd.metarow, takes a fresh snapshot and evaluates. - Revisions are a counter in the meta row, not a sequence. All changes in one request share one revision; a rollback uses none.
- Reads also write a logged publication barrier, so a read response, like a write, leaves only after a synchronous commit. An unknown commit outcome is never replayed.
- Watch streams complete revisions from the
eventstable.NOTIFYis only a wake-up hint; polling recovers missed notifications. - Leases are rows. After a restart every lease gets a full TTL again: a fault can delay expiry, never cause an early one.
- Compact is logical.
MemberListandStatusreport one logical member.
Supported API
Range, Put, DeleteRange, Txn, Compact (logical), LeaseGrant, LeaseRevoke, LeaseTimeToLive,
LeaseLeases, LeaseKeepAlive, Watch, MemberList and Status.
Not implemented: Auth, User and Role RPCs, member changes, other Maintenance RPCs, Lock and Election, and the HTTP/JSON gateway. Without the HTTP/JSON gateway, Patroni cannot use pgetcd as its DCS yet.
Source and credit
pgetcd is developed by PGSTY and pgetcd contributors. etcd is a project of the Cloud Native Computing Foundation; Mimus is not affiliated with the etcd project.
Pages in this section adapt the pgetcd companion documentation, © PGSTY and pgetcd contributors, CC BY 4.0; see Licence and attribution.
Build the gateway and extension, create a tenant, start pgetcd and check readiness.
Use pgetcd from etcdctl and from a Go client.
Supported RPCs, limits, differences from etcd and the evidence behind them.
Components, request paths, tenants and persistent state in pgetcd.
Gateway configuration and the SQL ABI of pg_etcd.
Monitor, troubleshoot and build pgetcd.
Current candidate, its test results, known issues and what remains for the MVP.
The release candidate and the acceptance checkpoints before it.
The decisions that define pgetcd, condensed from its design records.