Hacker News with Generative AI: Postgres

"Just Use Postgres" Book (manning.com)
You probably don’t need a collection of specialty databases. Just use Postgres instead!
Reads Causing Writes in Postgres (jesipow.com)
It is good practice to regularly inspect the statements running in the hot path of your Postgres instance. One way to do this is to examine the pg_stat_statements view, which shows various statistics about the SQL statements executed by the Postgres server.
Shrinking a Postgres Table (johnnunemaker.com)
Ok folks, this is kind of a weird one. I'm going to put it in the "you won't ever need this, but if you do, you are going to be glad I wrote this up for ya" category.
Django and Postgres for the Busy Rails Developer (andyatkinson.com)
About 10 years ago I wrote a post PostgreSQL for the Busy MySQL Developer, as part of switching from MySQL to Postgres for my personal and professional projects, wherever I could.
Running Durable Workflows in Postgres Using DBOS (supabase.com)
Michael Stonebraker is the inventor of Postgres and a Turing Award winner. His latest venture is DBOS, a three-year joint research project between Stanford and MIT. The DBOS team have built a Durable Workflow engine using Postgres. It's one of the of the more elegant designs I've seen, leveraging the features of Postgres to keep it lightweight and fast.
Show HN: Performing a zero downtime major version upgrade on RDS Aurora Postgres (medplum.com)
Medplum is built on Postgres. Until recently, our hosted Medplum service was using an Amazon Web Services (AWS) RDS Aurora Postgres cluster running version 12.16. Since v12 is rather outdated and nearing the end of its standard support window on RDS, it was time to plan our upgrade to the newest version available on RDS, v16.4.
Keyset cursors, not offsets, for Postgres pagination (sequinstream.com)
We're building Sequin, a Postgres CDC tool to streams and queues like Kafka, SQS, HTTP endpoints, and more. Efficient, correct pagination is paramount for our backfill process, so we use keyset cursors extensively.
Pg_parquet – Postgres to Parquet Interoperability (i-programmer.info)
Shrinking a Postgres Table (johnnunemaker.com)
Ok folks, this is kind of a weird one. I'm going to put it in the "you won't ever need this, but if you do, you are going to be glad I wrote this up for ya" category.
Show HN: Neon-PostgREST – Build a Supabase-Like API/SDK DevX over Neon (github.com/zuplo-samples)
Are you using/considering Neon (or your own hosted Postgres) - but wish you had the ability to interact with your database via API/SDK like Supabase? Look no further! This project shows you exactly how to recreate the Supabase API and developer experience. Try the Demo.
What I wish someone told me about Postgres (challahscript.com)
I’ve been working professionally for the better part of a decade on web apps and, in that time, I’ve had to learn how to use a lot of different systems and tools.
Show HN: BemiDB – Postgres read replica optimized for analytics (github.com/BemiHQ)
BemiDB is a Postgres read replica optimized for analytics, It consists of a single binary that seamlessly connects to a Postgres database, replicates the data in a compressed columnar format, and allows you to run complex queries using its Postgres-compatible analytical query engine.
Neon Authorize: Simplifying row-level security for Postgres (neon.tech)
Today we’re launching Neon Authorize, a tool that aims to simplify the usage of Postgres row-level security policies while enabling new deployment models for app developers.
Graph Retrieval Using Postgres Recursive CTEs (sheshbabu.com)
Did you know you can use Postgres as a graph database for certain usecases?
Pg_parquet: An extension to connect Postgres and parquet (crunchydata.com)
Today, we’re excited to release pg_parquet - an open source Postgres extension for working with Parquet files.
How we build forms in LiveView and LiveSvelte (sequinstream.com)
We're Sequin, an open source message stream built on Postgres. We have a console for managing tables and streams, and that console is built with LiveView + LiveSvelte.
Putting a full power search engine in Ecto (moosie.us)
ParadeDB is a set of extensions that add pretty amazing search and analytics features to Postgres. In particular, ParadeDB embeds Tantivy as an extension via pgrx.
Optimizing Postgres table layout for maximum efficiency (r.ena.to)
When modeling a Postgres database, you probably don’t give much thought to the order of columns in your tables. After all, it seems like the kind of thing that wouldn’t affect storage or performance. But what if I told you that simply reordering your columns could reduce the size of your tables and indexes by 20%? This isn’t some obscure database trick — it’s a direct result of how Postgres aligns data on disk.
Deep Dive into Postgres Write-Ahead Logs (artie.com)
Write-ahead logs are one of four components required for logical replication. They are used to ensure data durability, meaning your data is consistent and protected against data loss. Even if a server machine fails, write-ahead logs ensure your changes persist.
A few secure, random bytes without `pgcrypto` (brandur.org)
In Postgres it’s common to see the SQL random() function used to generate a random number, but it’s a pseudo-random number generator, and not suitable for cases where real randomness is required critical. Postgres also provides a way of getting secure random numbers as well, but only through the use of the pgcrypto extension, which makes gen_random_bytes available.
Real World Performance Gains with Postgres 17B-Tree Bulk Scans (crunchydata.com)
With RC1 freshly cut, the release of Postgres 17 is right on the horizon, giving us a host of features, improvements, and optimizations to look forward to.
Why avoid where id in with variable number of bind parameters on Postgres (kaveland.no)
In my post about batch operations, I used the where id = any(:ids) pattern, with ids bound to a JDBC array. I’ve gotten questions about that afterwards, asking why I do it like that, instead of using in (:id1, :id2, ...). Many libraries can take care of the dynamic SQL generation for you, so often you can just write in (:ids), just like the array example.
Building RAG with Postgres (anyblockers.com)
Postgres is a powerful tool for implementing Retrieval-Augmented Generation (RAG) systems. Its versatility and robustness make it an excellent choice for this task. By diving deep into a technology you’re already familiar with, you can experience a significant productivity boost. As the saying goes, “stick with the tools you know.” Using Postgres for RAG allows you to reason about the system more easily, cutting through the hype and focusing on building something great.
YugabyteDB with Enhanced Postgres Compatibility (yugabyte.com)
We are thrilled to announce powerful new capabilities and architectural enhancements — collectively called enhanced Postgres compatibility — that allow a broader range of Postgres apps to run on YugabyteDB.
Building RAG with Postgres (anyblockers.com)
Postgres is a powerful tool for implementing Retrieval-Augmented Generation (RAG) systems. Its versatility and robustness make it an excellent choice for this task. By diving deep into a technology you’re already familiar with, you can experience a significant productivity boost. As the saying goes, “stick with the tools you know.” Using Postgres for RAG allows you to reason about the system more easily, cutting through the hype and focusing on building something great.
Show HN: Selectable – mobile-friendly Postgres client (getselectable.com)
The Selectable app lets you access your Postgres database with a beautiful mobile-optimised experience that lets you write complex SQL queries without breaking a sweat.
Window Functions for Data Analysis with Postgres (crunchydata.com)
SQL makes sense when it's working on a single row, or even when it's aggregating across multiple rows. But what happens when you want to compare between rows of something you've already calculated? Or make groups of data and query those? Enter window functions.
Rainfrog – a database management TUI for Postgres (github.com/achristmascarl)
🐸 a database management tui for postgres
Ask HN: Where are you hosting your Postgres database in 2024? (ycombinator.com)
Ask HN: Where are you hosting your Postgres database in 2024?
ClickHouse Data Modeling for Postgres Users (clickhouse.com)
Last month, we acquired PeerDB, a company that specializes in Postgres CDC. PeerDB makes it fast and simple to replicate data from Postgres to ClickHouse. A common question from PeerDB users is how to model their data in ClickHouse after the replication process to maximize the benefits of ClickHouse.