Show HN:Peat,Neon 的无服务器 Postgres 的一个分支,基于 Postgres 18 和 19
Show HN: Peat, a fork of Neon's serverless Postgres, on Postgres 18 and 19

原始链接: https://github.com/Zabaca/peat

Peat 是 Neon(开源无服务器 Postgres)的分支,它使 Neon 的存储引擎保持与 Postgres 18 和 19 同步,并新增 Kubernetes operator。它保留 Neon 的统一存储层,支持缩容至零、即时写时复制分支、时间点恢复和读副本。operator 允许用户声明一个 Platform 对象来安装和运行存储、控制平面和入口;每个数据库都是 Kubernetes 对象,并支持有序升级。Peat 解决了上游 Neon 活跃开发停滞的问题,同时保留其设计。它处于 alpha 阶段,并运行 Zabaca 的生产数据库。使用 Docker、kind、kubectl、Bun 和 psql 在笔记本电脑上快速开始约需两分钟;真实集群安装有文档说明。Peat 与 Neon 或 Databricks 无关联。

黑客新闻 最新 | 过去 | 评论 | 提问 | 展示 | 工作 | 提交 登录 Show HN:Peat,Neon 无服务器 Postgres 的分支,支持 Postgres 18 和 19 ( github.com/zabaca ) 10 分 由 uptownhr 1 小时前 | 过去 | 收藏 | 讨论 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Peat is a fork of Neon, the open-source serverless Postgres. It keeps Neon's storage engine running on current Postgres releases (18 and 19) and adds a Kubernetes operator that installs and runs it for you.

Neon's design is what makes it worth keeping. One storage layer holds the whole history of a database, so a branch, a restore to any moment and a database that costs nothing while asleep all come from the same place.

We first tried to get there with standard Postgres: CloudNativePG, with ZFS snapshots for branches and our own gateway for sleep and wake. It mostly worked, but every feature was a separate part to run, upgrade and watch. It was also slower: in our tests on the same machines, a branch took 16 seconds against under 3 on Neon, and a restore took 20 seconds or more against about 1. The other open-source options we looked at were the same shape, or didn't have all the features.

But Neon's open-source repository is no longer kept up in the open: it stopped taking new Postgres releases in 2025. Peat keeps it alive and current.

Serverless Postgres, with storage separated from compute:

  • Scale to zero. A database nobody is using is stopped (its data stays); the next connection wakes it, in seconds.
  • Instant branches. Copy-on-write: a branch copies no data and costs only what it later changes.
  • Point-in-time recovery. Restore a database, or branch it, from any moment in its history (seven days by default).
  • Read replicas. A read-only copy that follows its primary, made with one object, asleep until you connect to it.

A control plane and a Kubernetes operator. You declare one Platform object (a bucket and a few machines) and the operator installs and runs the whole thing: the storage, the control plane and the front door that databases are reached through. Each database is a Kubernetes object. Upgrades are ordered and checked: change the release in the Platform and the platform moves one piece at a time. A database can be moved to a newer Postgres version the same way, by changing one field.

Alpha (peat.zabaca.com/v1alpha1). It runs Zabaca's own production databases.

On a laptop, about two minutes. You need Docker (running), kind, kubectl, Bun and psql:

git clone --depth 1 --branch release-2026-11-28.1 https://github.com/Zabaca/peat
peat/control/examples/try-it.sh

It makes a throwaway kind cluster, installs the latest release (release-2026-11-28.1), makes a database, writes and reads it with psql, puts it to sleep and wakes it by connecting, then prints how to connect yourself and how to delete the cluster and the two small files it keeps in $TMPDIR (kind delete cluster --name peat-try; the cluster's name is CLUSTER if you set it). To run another release: RELEASE=<release tag, or a commit of main with published images> peat/control/examples/try-it.sh; to run another Kubernetes version: NODE_IMAGE=kindest/node:v1.30.13 peat/control/examples/try-it.sh (releases are listed at github.com/Zabaca/peat/releases).

On a real cluster: Install on a real cluster.

  • control/README.md: the operator, databases, upgrades, the peat command, and installing on a real cluster.
  • FORK.md: how Peat relates to Neon: what it is based on, what it changed, what has been tested.
  • NEON-README.md: Neon's own README, with its build and local-run instructions.

Neon is licensed under the Apache License 2.0 (LICENSE); its NOTICE file is kept unchanged. The PostgreSQL trees in vendor/ are under the PostgreSQL licence (vendor/postgres-vX/COPYRIGHT). Peat's changes are under the same licences. Peat is not affiliated with or endorsed by Neon or Databricks.

联系我们 contact @ memedata.com