PostgreSQL
What is PostgreSQL
You now know what a database is and why SQL databases exist. In this lesson you will get a clear picture of PostgreSQL specifically — what it is, where it came from, how it is used today, and why developers and companies all over the world choose it over other databases. This is the foundation you need before you start installing and writing your first queries.
PostgreSQL (pronounced post-gres-Q-L, often just called Postgres) is a free, open-source relational database management system. It stores your data in structured tables, lets you query it using SQL, enforces rules to keep your data accurate, and handles everything from a tiny personal project to a system serving millions of users simultaneously.
What sets PostgreSQL apart from other databases is its combination of reliability, feature depth, and openness. It has been in active development for over 35 years, has a passionate global community, and has never had a licensing fee. You can download it, use it in production, and build commercial products on top of it — completely free.
Where PostgreSQL Came From
PostgreSQL was born at the University of California, Berkeley in 1986 as a research project called POSTGRES, led by Professor Michael Stonebraker. The goal was to build a next-generation database that went beyond the limitations of existing systems at the time.
In 1994, two students added SQL support to the project and released it as open-source software. By 1996 it was renamed PostgreSQL to reflect its SQL compatibility. Since then, a global community of developers has continuously improved it — releasing a major version every year with new features, performance improvements, and security updates.
Today PostgreSQL is maintained by the PostgreSQL Global Development Group — a worldwide volunteer and corporate contributor community. No single company owns it. That independence is part of why it has earned so much trust.
Who Uses PostgreSQL
PostgreSQL is not just popular among developers learning databases — it powers production systems at some of the largest companies and platforms in the world.
- Apple — uses PostgreSQL as part of its internal data infrastructure
- Instagram — managed hundreds of millions of user records on PostgreSQL before migrating to a sharded version
- Spotify — uses PostgreSQL for user data and music metadata
- Reddit — ran its entire early platform on PostgreSQL
- Twitch — uses PostgreSQL for user accounts and platform data
- The US Federal Aviation Administration (FAA) — uses PostgreSQL for critical air traffic systems
- Thousands of startups and enterprises worldwide use it as their primary database
Every major cloud provider — Amazon Web Services, Google Cloud, and Microsoft Azure — offers PostgreSQL as a fully managed cloud service. This means you can run PostgreSQL without managing any server infrastructure at all.
PostgreSQL vs Other SQL Databases
You may have heard of MySQL, Microsoft SQL Server, or Oracle. All of these are relational databases that use SQL. Here is how PostgreSQL compares to the most common ones.
| Feature | PostgreSQL | MySQL | SQL Server / Oracle |
|---|---|---|---|
| Cost | Free forever | Free (community) | Expensive licensing |
| Ownership | Community-owned | Owned by Oracle | Microsoft / Oracle |
| ACID compliance | Full | Partial (depends on engine) | Full |
| Advanced data types | JSON, arrays, custom types, geospatial | Basic JSON support | Limited |
| Extensibility | Highly extensible (custom functions, types) | Limited | Moderate |
| Cloud availability | AWS, GCP, Azure all support it | Available on all clouds | Available (costly) |
| Best for | Complex queries, data integrity, modern apps | Simple web apps, read-heavy workloads | Enterprise, legacy systems |
What Makes PostgreSQL Stand Out
PostgreSQL is not just another SQL database. It has a set of capabilities that genuinely distinguish it from the rest, and understanding them will help you appreciate why you are learning this specific tool.
True ACID compliance — every transaction in PostgreSQL is safe. If a crash happens mid-operation, your data is never left in a broken state. This is non-negotiable for financial, medical, and any business-critical system.
Advanced data types — beyond the usual text, numbers, and dates, PostgreSQL natively supports JSON and JSONB (binary JSON), arrays, UUID, network addresses, geometric shapes, and full-text search. You can store and query semi-structured data inside a relational database without needing a separate NoSQL system.
Extensibility — PostgreSQL lets you create your own data types, operators, index types, and functions. The PostGIS extension adds full geospatial database capability — used by mapping and location-based services worldwide.
Concurrency without locking — PostgreSQL uses a system called MVCC (Multi-Version Concurrency Control) that allows many users to read and write data at the same time without locking each other out. This keeps performance high even under heavy load.
Standards compliance — PostgreSQL follows the SQL standard more closely than any other open-source database. SQL you write for PostgreSQL will work with minimal changes on any other standards-compliant database.
How PostgreSQL Fits Into a Real Application
PostgreSQL never works alone — it is always part of a larger system. Understanding where it sits in a real application helps you see the full picture before you start writing SQL.
In a typical web application, a user opens a browser or app and makes a request — for example, viewing their order history. The application server (built with Node.js, Python, Java, or any other language) receives that request and sends a SQL query to PostgreSQL. PostgreSQL finds the right data, returns it to the application server, and the server sends it back to the user's screen. This entire round trip often happens in milliseconds.
PostgreSQL sits in the middle of this system as the single source of truth — every piece of persistent data lives there. The application layer reads from it and writes to it constantly. Keeping that database well-designed, well-indexed, and well-maintained is one of the most important engineering responsibilities in any product team.
Lesson Summary
| Topic | Key Point |
|---|---|
| PostgreSQL origin | Started at UC Berkeley in 1986, open-source since 1996 |
| Cost | Completely free — no licensing fee ever |
| ACID compliance | Full — data is always safe and consistent |
| Advanced types | JSON, arrays, UUID, geospatial, full-text search |
| Extensibility | Custom types, functions, operators, extensions like PostGIS |
| Concurrency | MVCC allows simultaneous reads and writes without blocking |
| Who uses it | Apple, Instagram, Spotify, Reddit, FAA and thousands more |
| Cloud support | AWS RDS, Google Cloud SQL, Azure Database for PostgreSQL |
🧪 Practice Questions
Answer based on what you learned in this lesson.
1. At which university was PostgreSQL originally developed?
2. What concurrency system does PostgreSQL use to allow simultaneous reads and writes without blocking?
3. PostgreSQL is completely __________ to use — there is no licensing cost.
4. Which PostgreSQL extension adds full geospatial and mapping capabilities?
5. In what year was the project renamed PostgreSQL and released as open-source?
🎯 Quiz — Test Your Understanding
Q1. Which combination best describes why PostgreSQL is preferred over other databases?
Q2. Which company owns MySQL?
Q3. In a web application, what role does PostgreSQL play?
Q4. Which PostgreSQL data type stores JSON in binary format for faster querying?
Q5. Which cloud platforms offer PostgreSQL as a managed service?
Next up: The full list of PostgreSQL features that make it the world's most advanced open-source database.