Just Use Postgres for Everything
The blog post advocates for using PostgreSQL extensively in tech stacks to simplify development, improve productivity, and reduce complexity. It highlights benefits like scalability, efficiency, and cost-effectiveness, promoting a consolidated approach.
Read original articleIn a blog post titled "Just Use Postgres for Everything," the author advocates for simplifying tech stacks by relying solely on PostgreSQL for various backend functionalities. By leveraging Postgres for tasks like caching, message queuing, data warehousing, geospatial queries, full-text search, and more, developers can streamline development, reduce complexity, and enhance productivity. The post suggests using Postgres in place of technologies like Redis, Kafka, Mongo, and Elastic, highlighting its versatility and efficiency. The author emphasizes the benefits of consolidating on Postgres, such as easier scalability, reduced cognitive load, and increased feature output without added costs. By adopting a "Postgres for everything" approach, startups can optimize their resources, focus on value-added tasks, and improve overall operational efficiency. The post also teases an upcoming book on technical debt and offers additional insights on CTO-related topics.
Related
Automatically setup pgAdmin with a Docker database
Developer experience is enhanced by configuring a PostgreSQL local environment with Docker Compose. Defining variables and leveraging folders streamlines setup. Integrating pgAdmin automates connections, improving efficiency and simplifying future deployments.
Supabase (YC S20) Is Hiring Postgres SREs
Supabase seeks a Site Reliability Engineer to manage Postgres databases remotely. Responsibilities include enhancing reliability, ensuring high availability, and optimizing performance. Ideal candidates possess multi-tenant database experience, Postgres tools proficiency, and AWS deployment skills. Benefits include remote work, equity, health coverage, and tech allowance.
Using short lived Postgres servers for testing
Database servers like PostgreSQL can be quickly set up for short-lived environments or CI/CD pipelines by creating new data directories and using pg_basebackup for efficient data population. This method simplifies testing and demo setups.
Just Use Postgres for Everything
The article promotes using Postgres extensively in tech stacks to simplify development, improve scalability, and reduce operational complexity. By replacing various technologies with Postgres, developers can enhance productivity, focus on customer value, and potentially cut costs.
Mongo but on Postgres and with strong consistency benefits
The Pongo project on GitHub offers a tool for utilizing MongoDB-like syntax on Postgres with strong consistency benefits. It supports data operations in Postgres and provides a MongoDB-compatible shim. Visit the GitHub repository for details.
1. you get concurrency and pubsub built in with no external dependancies.
2. postgres suppport out of the box. our entire deployment is just phoenix + postgres
3. creating a microservice is easy. create a genserver, add it to your application.ex -> DONE. no need to create a seperate repo. its already able to send and receieve messages from other parts of your monolith using the built in pubsub system
4. Oban, the background worker library uses postgres.
end result is that as a small team, we are able to knock out a lot of features and scale it without any of the complexity most startups have. Its been 4 years and only now we are starting to consider bringing in an external message queue.
> Use Postgres for Fulltext Search instead of Elastic.
Yea, that's not quite the same. Im going to make the argument that a well tuned search platform along side your data storage is probably one of the most useful things you can have. It's one of the first places where you will be "let down" by the Postgres solution.
As a document store, a queue, Postgres will do the job up to a point. When and where it breaks down in one of these ancillary roles you're likely to have the resource to support more systems, or a more "focused" tool.
1. It's nice if you can avoid using Postgres to store large files. 2. It's nice if you can avoid using Postgres for an event stream with massive volume (say billions of records per month that must be maintained and queried).
Postgres will work for either of these, but there are real advantages that come if you can keep your database lighter than these allow for.
This is not the same thing, is it? Redis is in-memory, while the Postgres tables will be on disk, even UNLOGGED.
Like, I've personally worked on many systems that used Redis for absolutely no reason. As it was not actually measurably improving the latency of any part of the system. It was basically just another place to store data.
Obviously, Postgres and Redis are not the same, and there are situations where keeping data in memory at all times is important for latency. Hence the caveat. But most companies are not in any such situation.
Same story with the rest of these technologies - people often reach for them without really considering whether they are any sort of improvement over just storing the data in a relational database. This is commonly done by engineers who underestimate the capabilities of a relational database.
Related
Automatically setup pgAdmin with a Docker database
Developer experience is enhanced by configuring a PostgreSQL local environment with Docker Compose. Defining variables and leveraging folders streamlines setup. Integrating pgAdmin automates connections, improving efficiency and simplifying future deployments.
Supabase (YC S20) Is Hiring Postgres SREs
Supabase seeks a Site Reliability Engineer to manage Postgres databases remotely. Responsibilities include enhancing reliability, ensuring high availability, and optimizing performance. Ideal candidates possess multi-tenant database experience, Postgres tools proficiency, and AWS deployment skills. Benefits include remote work, equity, health coverage, and tech allowance.
Using short lived Postgres servers for testing
Database servers like PostgreSQL can be quickly set up for short-lived environments or CI/CD pipelines by creating new data directories and using pg_basebackup for efficient data population. This method simplifies testing and demo setups.
Just Use Postgres for Everything
The article promotes using Postgres extensively in tech stacks to simplify development, improve scalability, and reduce operational complexity. By replacing various technologies with Postgres, developers can enhance productivity, focus on customer value, and potentially cut costs.
Mongo but on Postgres and with strong consistency benefits
The Pongo project on GitHub offers a tool for utilizing MongoDB-like syntax on Postgres with strong consistency benefits. It supports data operations in Postgres and provides a MongoDB-compatible shim. Visit the GitHub repository for details.