PostgreSQL
About PostgreSQL
PostgreSQL is a relational database server, and the download here is the full installer that puts the server, a graphical administration tool and a command-line client on one machine. What you get is a database that enforces the rules you give it. Foreign keys that refuse orphaned rows, constraints that reject bad data at the door, transactions that either complete entirely or leave no trace, and a type system extensible enough that an array, a JSON document, a geographic point or a range of dates is a first-class column rather than a workaround.
The trait that shapes everything else is concurrency without read locks. Every transaction sees a consistent snapshot of the data as it stood when the transaction began, so readers never wait for writers and writers never wait for readers. That is why a reporting query can run against a live system while orders are being written into the same tables.
The trade is housekeeping. Old row versions pile up until a background process clears them, and understanding that process is the difference between a database that stays fast and one that mysteriously slows. PostgreSQL also treats schema changes as transactions.
Create a table, alter a column and add an index inside one transaction, and if anything fails the whole change rolls back. Most databases cannot do that, and it is the single feature that makes migrations on a live system feel safe rather than reckless.
What the installer sets up
The PostgreSQL installer configures the server as a service that starts with the machine, asks for a superuser password, a port and a data directory, and offers a locale. It then installs pgAdmin, the browser-based administration tool, and psql, the command-line client that experienced users end up living in. A component picker, Stack Builder, runs afterwards and offers drivers, language packs and spatial extensions for download.
Two decisions at install time matter later. The data directory is where every database will live, so a fast drive with room to grow is the right answer, and the default port is the one every client library expects. Change either and you will type them into configuration files for years.
The default configuration is conservative, sized for a small machine, and tuning memory and connection settings is the first task on anything larger.
Data types beyond text and numbers
PostgreSQL columns can hold arrays of any type, which are indexed and queried as arrays rather than as delimited strings. JSONB stores JSON documents in a binary form that indexes with GIN so that a lookup inside a document is as fast as a lookup on a normal column, with operators for containment, path extraction and modification. Range types express an interval of dates, numbers or timestamps as one value, and exclusion constraints can guarantee that no two bookings overlap without application code checking.
Full-text search is built into PostgreSQL, with language-aware stemming and dictionaries, ranked results and indexes that keep it fast. Geometric types exist natively, and the spatial extension turns them into a complete geographic information system.
Enumerated types, network address types, UUIDs and money round it out, and if none of those fits, a custom type can be defined with its own operators and index support.
Indexes and the query planner
B-tree indexes handle the ordinary cases in PostgreSQL. Beyond them sit GIN for arrays, JSONB and full-text search, GiST for geometry and ranges, BRIN for very large tables where values correlate with physical position, and hash for equality only. Partial indexes cover a subset of rows, expression indexes cover a computed value, and covering indexes carry extra columns so a query never touches the table.
The planner decides how to run each query using statistics gathered from the data, and EXPLAIN shows its plan with estimated and measured figures side by side. Reading those plans is the core skill of tuning, and DBeaver draws them as a diagram for anyone who finds the text form hard to follow. A query that is slow is almost always slow because the planner chose a sequential scan when an index existed, because statistics were stale, or because an index the query needed was never built.
Parallel execution spreads large scans and aggregations across cores automatically once a query is expensive enough to justify it.
Extensions, and why they define the product
The extension mechanism is what separates PostgreSQL from other databases, because an extension can add types, functions, index methods and even planner behaviour that integrate with transactions and replication as if they were built in.
The spatial extension adds thousands of functions and index types for geographic data. A time-series extension partitions tables by time automatically, compresses old chunks and maintains rolling aggregates. A vector extension stores embeddings and performs similarity search for machine learning applications. Query statistics, foreign data wrappers that present a remote database or a CSV file as a local table, and cryptographic functions are all extensions too.
Procedural languages are extensions as well. Functions and triggers can be written in the built-in procedural SQL, or in Python, Perl and others, so logic that must live beside the data can be written in a language the team already knows, with a Python distribution supplying the interpreter the Python variant needs.
Replication and partitioning at scale
PostgreSQL streaming replication copies the write-ahead log to standby servers, giving hot standbys that serve read queries and take over on failure. Logical replication publishes changes from chosen tables to subscribers, which allows selective copying, replication between differing major releases and feeding a data warehouse from a live system. It is not a transparent clone, since schema changes are not replicated and conflicts are not resolved automatically, and anyone deploying it should plan for both.
Declarative partitioning splits a large table by range, list or hash into child tables the planner prunes at query time, so a query for one month reads one partition. Point-in-time recovery restores a database to any moment covered by archived logs, which is the answer to a bad deletion discovered hours later.
Connection handling is process-based, with one server process per connection, so applications with many short-lived connections need a pooler in front of the server rather than opening connections directly.
Administration with pgAdmin and psql
pgAdmin, the graphical tool bundled with PostgreSQL, presents servers and databases, then tables and roles, in a tree, with a query tool, a graphical EXPLAIN that draws the plan as a diagram, a dashboard of live activity and dialogs for every object type. It runs in a browser, which some find awkward and others never notice. Backup and restore use the dump utilities behind the scenes, and a server’s configuration can be edited from the same window.
psql is the other half. It is a terminal client with tab completion, meta-commands that describe tables and list objects with two keystrokes, and the ability to run scripts, which is why it remains the tool for anything repeatable. Teams that share queries lean on a collaborative SQL editor that connects to the same server.
Where it asks more of you
Autovacuum, the PostgreSQL process that reclaims old row versions, is on by default and tuned for modest workloads, and a busy table can outrun it. When that happens, tables bloat and queries slow, and the fix is per-table tuning that nobody tells you about until it hurts.
Connection overhead means a pooler is effectively mandatory for web applications. The default settings suit a small server and undersize everything on a large one. And the tooling is plentiful but fragmented, so a team choosing between clients, migration tools and monitoring has decisions to make that a single-maker product would have made for them.
Against MySQL, it offers richer types, transactional schema changes and the extension ecosystem, in exchange for a steeper administrative learning curve and heavier per-connection resources. For an application that needs the database to enforce its rules and grow with it, that trade has become the default choice for a large share of new projects.
Conclusion
PostgreSQL suits any application whose data has rules that deserve enforcing and whose queries will grow beyond simple lookups. Teams building transactional systems, anyone who needs documents and relations in the same database, and projects that expect to add spatial, time-series or search features later will find the extension system removes the need for a second database.
It asks for competent administration in return. Autovacuum, connection pooling and configuration sizing are not optional knowledge on a busy system, and the tooling requires choices. Learn to read a query plan, tune autovacuum before it bites, put a pooler in front of the server, and it will carry an application from first prototype to production without a migration to something else.
Pros & Cons
- Transactions see consistent snapshots, so readers and writers never block each other
- Schema changes run inside transactions and roll back cleanly on failure
- JSONB and arrays, plus ranges and full-text search, as native indexed column types
- Extensions add spatial, time-series and vector capabilities that integrate fully
- Streaming and logical replication with partitioning and point-in-time recovery built in
- pgAdmin and psql cover graphical and scripted administration out of the box
- Autovacuum needs per-table tuning on busy systems or tables bloat
- One process per connection makes a connection pooler effectively required
- Default configuration is sized for a small machine
- Logical replication skips schema changes and does not resolve conflicts
- Tooling is fragmented across many third-party clients and utilities
Frequently asked questions
Yes. The JSONB type stores documents in binary form with GIN indexing, so queries inside a document run as fast as on ordinary columns, with operators for containment and path extraction.
Yes. Table creation, column changes and index creation all run inside transactions and roll back if anything fails, which makes live migrations far safer.
Old row versions accumulate faster than autovacuum clears them on busy tables. Tune autovacuum settings per table and check for bloat with the statistics views.
For web applications, almost always. Each connection is a server process, so many short-lived connections exhaust resources without a pooler in front.
Streaming copies the whole server's write-ahead log to standbys for failover and read scaling. Logical publishes changes from selected tables and works across releases, but skips schema changes.