What Makes PostgreSQL Different — Architecture & Philosophy

PostgreSQL

Chapter 1 · What Makes PostgreSQL Different — Architecture & Philosophy

This course assumes real, working SQL knowledge — mysql2 and mysql3 already cover SELECT, JOINs, subqueries, CTEs, window functions, and query optimization in depth, and that knowledge transfers directly to Postgres, since both are SQL. This course is deliberately not going to re-teach any of that. Instead, every chapter asks the same question: what does Postgres actually do differently from the MySQL this site already covers, and why does it matter?

Two Relational Databases, Two Different Origins

MySQL began as MySQL AB, was acquired by Sun Microsystems in 2008, and then by Oracle in 2010 — it's now owned outright by a single corporation, dual-licensed under the GPL and a commercial license. PostgreSQL began as the POSTGRES project at UC Berkeley in 1986 under Michael Stonebraker, and is now developed by the PostgreSQL Global Development Group — a community-driven governance model with no single owning company, released under the permissive, MIT/BSD-style PostgreSQL License.

This isn't just trivia — it has real practical consequences. There's no dual-licensing tension to navigate with Postgres, no single vendor who could change licensing terms or direction unilaterally, and new features land based on community and committer consensus rather than one company's own product roadmap.

Standards-Compliance-First Design Philosophy

Postgres has historically prioritized strict SQL standard compliance and correctness over convenience shortcuts — stricter type checking, and a general unwillingness to silently coerce or truncate data rather than raising an error. MySQL's own historical trade-off leaned toward speed and ease of use, with looser default behavior in older versions (permissive date validation, silent truncation).

Be fair to modern MySQL
This is a common, somewhat outdated criticism of MySQL specifically. Modern MySQL versions default to strict SQL mode (STRICT_TRANS_TABLES and similar) and have tightened this behavior considerably since the loose-defaults era the comparison above is usually describing. The real, durable difference isn't "Postgres validates and MySQL doesn't" — both can be configured to validate strictly today. The durable difference is closer to default philosophy: Postgres has leaned toward strict correctness as its own starting point since early on, where MySQL historically optimized for ease of adoption first and tightened defaults later.

Process-Per-Connection vs. Thread-Per-Connection

Postgres gives each client connection its own operating system process — full process isolation, meaning one connection crashing can't directly take down another connection or the server as a whole. Processes are heavier to spawn than threads, though, which is exactly why connection poolers like PgBouncer become important at real scale. MySQL instead handles each client connection as a thread within a single shared server process — threads are lighter-weight to create, but a serious bug in one thread's handling puts the entire mysqld process genuinely at risk, since threads share memory space far more directly than isolated processes do.

This is a real architectural choice with real trade-offs, not an accident — the same category of decision c3-3 covered when it demonstrated a genuine race condition using pthreads: shared memory between concurrent execution units buys speed at the cost of a whole class of bugs that simply can't happen when each connection is a fully separate process instead.

When to Choose Each

This isn't "Postgres is better" — both are excellent, mature, production-proven engines, and plenty of real organizations run both simultaneously for different workloads.

Favors MySQLFavors PostgreSQL
Read-heavy web apps, WordPress-style CMS workloadsComplex queries, data-integrity-critical applications
Simpler replication setupsGeospatial workloads (PostGIS — previewed in this course's own Ch.10)
LAMP-stack tooling maturity and simplicityJSON-heavy hybrid relational/document workloads (this course's own Ch.4)

This Course's Own Roadmap

Difference named in this chapterResolved in
The schema concept MySQL doesn't really havepostgres1-2
A genuinely richer native type systempostgres1-3
JSONB as a document database inside a relational onepostgres1-4
Recursive CTEs and window function extraspostgres1-5
Built-in full-text searchpostgres1-6
A richer index ecosystempostgres1-7
PL/pgSQL vs. MySQL's own stored procedurespostgres1-8
MVCC & VACUUM vs. InnoDBpostgres1-9
Extensions (PostGIS and beyond)postgres1-10
Replication comparedpostgres1-11
Baseline assumed
This course assumes the installation/administration familiarity mysql1 already built for MySQL — postgres1-2 covers Postgres's own installation and administration model directly, rather than starting from zero on what a database server or a client tool even is.

Hands-On Exercises

Exercise 1

Explain the governance/ownership difference between MySQL and PostgreSQL, and describe one concrete practical consequence of that difference.

📄 View solution
Exercise 2

Explain the difference between Postgres's process-per-connection model and MySQL's thread-per-connection model, and describe one real trade-off of each.

📄 View solution
Exercise 3

Given two workloads — (a) a small WordPress-based blog, and (b) an application storing complex, deeply nested product catalog data with heavy JSON usage — decide which engine this chapter's own "when to choose each" table favors for each, and justify your answer.

📄 View solution

Chapter 1 Quick Reference

  • MySQL — Oracle-owned, dual-licensed · PostgreSQL — community-governed, permissively licensed, no single owner
  • Standards-compliance-first design in Postgres vs. MySQL's historical ease-of-adoption-first defaults — though modern MySQL has tightened its own defaults considerably
  • Postgres — process-per-connection, full isolation, heavier per-connection cost · MySQL — thread-per-connection, lighter-weight, shared memory risk (echoes c3-3's own pthreads race-condition material)
  • Neither engine is universally "better" — real organizations run both for different workloads
  • Next chapter: Installing & Administering PostgreSQL — psql, roles, and the schema concept MySQL doesn't really have