跳到正文
Hacker News (official RSS)(github.com)·· 3 小時前精選品質評分76

Peat 延續 Neon 的無伺服器 PostgreSQL,支援 PostgreSQL 18 和 19

Show HN: Peat, a fork of Neon's serverless Postgres, on Postgres 18 and 19

重點導讀

資料庫功能若分散在多套工具裡,安裝、升級和維護都會更麻煩。

  • Peat 是從 Neon 分支出來的開源無伺服器 PostgreSQL 專案,讓資料庫能在沒人使用時休眠,連線時再醒來,也能快速建立分支或還原到過去的時間點。
  • 它支援 PostgreSQL 18 和 19,並加入 Kubernetes 操作工具,讓管理者用一份設定就能安裝和管理整套服務,也能逐步升級。
  • Peat 目前仍是 Alpha 版本。

AI 伴隨問答

自備 Key 深度分析

針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:

推薦理由

Peat 把資料庫分支、時間點還原與閒置休眠放在同一套儲存設計中,也提供 Kubernetes 操作工具,適合瞭解它如何簡化部署與升級。

正文 · 原文

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.

Why it exists

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.

What it is

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.

What Peat adds

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.

Status

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

Quickstart

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.

More

  • 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.

Licence

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.

讀者討論

理性交流 · 即時討論