Postgres.ai Blog

postgres.ai · Company blog · on HN since 2020

Postgres.ai, a company building PostgreSQL tooling, writes on schema changes, locks, and database experimentation.

What HN saysHN commenters recommend its Postgres checkup reports and mention its ZFS-based database branching as a way to get instant copies of production data.
22HN people shared it
12linked it in comments
32stories submitted
720story points
8 months agolast shared
2020people per year2026

Most-shared posts

  1. 1
    Common DB schema change mistakes in Postgres
    4 people · 371 points · first shared 2022 · 80 comments on HN
  2. 2
  3. 3
    Postgres.ai Bot. Towards LLM OS for Postgres
    3 people · 7 points · first shared 2024 · 1 comments on HN
  4. 4
    Homepage
    3 people · first shared 2021
  5. 5
  6. 6
    Useful queries to analyze PostgreSQL lock queues
    2 people · 4 points · first shared 2021 · discussion on HN
  7. 7
    Self-Driving Postgres
    2 people · 4 points · first shared 2025 · discussion on HN
  8. 8
    Resources
    2 people · first shared 2021
  9. 9
    Database migration testing
    2 people · first shared 2021
  10. 10
    Joe, a Postgres query optimization bot
    1 people · 174 points · first shared 2020 · 37 comments on HN
  11. 11
    PostgreSQL Subtransactions Considered Harmful
    1 people · 110 points · first shared 2021 · 41 comments on HN
  12. 12
  13. 13
    Database Lab Engine 2.0 for PostgreSQL
    1 people · 5 points · first shared 2020 · discussion on HN
  14. 14
  15. 15

What HN people wrote when they linked it

tpetry · 2021-06-29
I do host a medium-sized PostgreSQL database, but i would love not to. I need the control you won't have with a cloud offering (you can't install extensions) but i don't want to do all the other steps, and you always have the fear that backups do not work correctly. And i am not the only one hosting it by my own, many people are using self-hosting PaaS like dokku, flynn or caprover. And all these solutions have a common problem, they all need to reinvent the database as a service layer. What is currently really missing is a good open-source PostgreSQL as a service appliance, something "simple" like Heroku. There have been attempts like Elephant Shed, but they all try to do too much and therefore fail in adoption as they never reach stability. Or people are forced to use complex solutions like patroni which is doing many things, but if something fails you have no clue what to do. So what is really missing? 1. A simple old-school PostgreSQL vm image 2. Built on a copy-on-write file system to clone production environments like https://postgres.ai/ and Heroku for development reasons which will not really need any storage space. 3. A built-in backup solution like pgBackRest storing the files encrypted in some cloud storage (and restore options!) 4. It does not need a complex ui or inspection/monitoring software, there are many solutions you can run on a different machine. 5. Replication, Auto-Failover etc. are hard just make it a single server which you scale vertically, if…
dewey · 2023-10-20
I didn’t see it in the article but that’s exactly what https://postgres.ai/ is doing already unless I’m missing some thing.
crubier · 2021-10-08
Very close. Actually companies such as https://postgres.ai/ use ZFS storage to provide git-like features on top of Postgres: Using copy-on-write on the underlying ZFS, you can "fork" a new branch of your DB with all the data, instantly. Then both branches can live their lives independently. But I don't think ZFS has the equivalent of git merge though.
ahachete · 2021-03-06
Postgres checkup (https://postgres.ai/products/postgres-checkup) produces very detailed and complete reports easily. This is my recommendation.
samokhvalov · 2021-12-28
This is great that you can do that. An experimental environment must be of the same size. Ideally, absolutely the same physically, to keep the same physical layout as on prod – bloat, etc – though, sometimes it's not allowed. Another problem here is that for each experiment, you might need a new environment. Plus, in larger teams, many people might want to do this work at the same time – so you end up combining efforts, synchronizing them, sharing environments. It slows you down. Or increases your cloud spending a lot. This is a kind of problem Steve Jobs described in his famous 1980 speech [1] about Apple: if we give each person their own computer, something special happens compared to the case when 10 persons share a single computer. Here it is the same: if we can give each engineer their own full-size DB copy for experiments, something special happens. They start moving much, much faster. SQL quality improves. DB changes (DDL, massive DML) stop failing. Finally, engineers start learning SQL, it's an eye-opener – they now can see how it works on large volumes (because they didn't have good environments for experiments before!) This is what we (Postgres.ai) have learned over the last couple of years developing Database Lab Engine [2]. It's an open-source tool for superfast cloning of Postgres databases of any size, based on copy-on-write provided by ZFS or LVM. On a single machine, you can have dozens of full-size clones up and running, conduct a lot of experiments at…
stansler · 2020-03-02
Joe running in Slack is indeed a way to simplify and speed-up SQL optimization workflow for developers, as it takes seconds to get initial query execution plans and optimization recommendations. >... With a Slack interface, so you don't need to bother with connection, provisioning, credentials and decommissioning. It's worth noticing that Joe is a use case of Database Lab (https://gitlab.com/postgres-ai/database-lab) and it's still possible to use Database Lab features like thin-clones provisioning of production-sized databases and fast data state reset with Database Lab client CLI (https://postgres.ai/docs/database-lab/6_cli_reference) for purposes of SQL optimization without Slack integration. If a user has sufficient access to the data they can provision thin-clone with Database Lab client CLI and use psql to work with the clone. Also, we have plans to add support of recommendations and statistics in CLI and REST API to the support of various messaging platforms in the future.
Hawxy · 2025-05-14
If all you care about is the forking aspect we use DBLab Engine pretty effectively: https://postgres.ai/products/dblab_engine. Gets deployed within your own infrastructure.
mkl95 · 2022-09-02
Let's say you wanted to test something quickly. You could 1) Clone your VM in 1.5s as described in the article 2) Clone your database in a few seconds with Database Lab Engine [1] 3) Something else? [1] https://postgres.ai/products/how-it-works
akartasov · 2022-01-25
There are several public Case Studies of real users (from small teams to quite large companies): https://postgres.ai/resources/ For more real-life feedback, welcome to the Database Lab Community Slack: https://slack.postgres.ai/
shabble · 2021-12-15
you could have a look at dblab[1] which (afaik, I've not yet tried using them) has some support for streaming in from a primary source and applying sanitisation functions/transforms The main value is the use of ZFS snapshots to give you almost-instant (2-3s for a 20G DB on my dev laptop) writeable clone of an import, which you can test your migrations etc against, and then just revert or destroy, which has been extremely helpful for me. Happy user, no relationship, etc. [1] https://postgres.ai/products/how-it-works
wdb · 2021-02-05
Thank you! Your posts let me know to this product: https://postgres.ai/docs/ Looks interesting too
prirun · 2022-04-25
I've used SQLite with HashBackup for 13 years and it's been awesome. A lot of the stories I read about "data corruption" with SQLite are, IMO, really about faulty applications that do database commits with the data in an inconsistent state from the application point of view. I've done it myself - it's an easy sin. I've migrated database versions 35 times over the last 13 years, ie, every individual HB database has been migrated 35 times. You don't always need to make a new table, do a copy, and switch over. In the latest migration, I added new columns, initialized them, dropped columns, etc. without doing a db copy. For this migration I wanted to switch to strict tables, where typing is strict. I could have done this by just altering the schema (it's just a bunch of text in the SQLite db) and then using SQL to make sure existing columns had the right data (using CAST). But instead, I created a general framework to allow me to migrate data from one schema to another, mainly so I could reorder columns if I wanted. That can't be done with ALTER statements, so I did end up doing a complete copy, but I've done many migrations without a copy. I found this paper interesting on "zero downtime migrations". https://postgres.ai/blog/20210923-zero-downtime-postgres-schema-migrat… After reading it, the bottom line is that changes happen within transactions (true for SQLite too), and the key to zero downtime migrations is to use short transactions,…

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close