Show HN: Peat, a fork of Neon's serverless Postgres, on Postgres 18 and 19
42 points - yesterday at 10:39 PM
SourceComments
Serverless Postgres, with storage separated from compute"
(Which is a very good idea, btw!)
Observation: All future databases should be written like this, that is, with a clear separation of whatever block (aka storage "bucket") based engine actually loads and stores the data on the back-end (sub-observation: this observation is relevant to future OS'es as well!) from the data structures and code and processing that goes on in the compute (aka CPU, aka running code) component in the main engine.
Code should always be written such that the block storage back-end (whether its local in the form of local hard disk space or whether its remote, in the form of Internet accessible block-based storage) is either #ifdef'd around (or the programming language's equivalent of #ifdef, i.e., "conditional compilation", "conditionally compiled", for example, in Rust it's '#[cfg(...)]', in Go it's '//go:build ...', in Zig it's 'if (@import("builtin")....)' or 'comptime', in Delphi/Pascal/FreePascal it's '{$IFDEF}..{$ENDIF}', etc., etc.
(Most languages have some form of #ifdef, or their own version, for conditional compilation: https://en.wikipedia.org/wiki/Conditional_compilation)
Or, optionally, the code could use plug-ins. Plug-ins for each of the separate database back ends supported.
If a database is to run on a local disk, then with conditional compilation you retain the ability to have a single fast local database executable that "does it all" and you have the ability to "compile the local back-end out" (i.e., switch to a plug-in or different code) simply by toggling the macro/directive that governs those #ifdefs on or off, i.e., present or absent during compile...
If you're into OOP, you could also do all of the above with Objects (different objects represent different back-end types, instantiate what you need at runtime) instead of #ifdefs and/or plug-ins...
Anyway, we welcome Peat to the storage separated from compute database arena!
Related:
https://en.wikipedia.org/wiki/Separation_of_concerns
https://en.wikipedia.org/wiki/Modular_programming
https://en.wikipedia.org/wiki/Encapsulation_(computer_progra...
Neon gets all of it from one storage layer, and I found nothing else open source that does. But its open repo stopped at Postgres 17.5. So I forked it, brought it to 18.7 and 19, and added a Kubernetes operator. It runs my production databases now. Alpha, not affiliated with Neon.
Try it in about two minutes:
git clone --depth 1 --branch release-2026-11-28.1 https://github.com/Zabaca/peat
peat/control/examples/try-it.sh