What Is New in PostgreSQL 8.2
PostgreSQL 8.2 delivers substantial performance gains and powerful new SQL features. This release focuses on making the database faster for heavy workloads and more capable for complex queries.
| Category | Key Changes |
|---|---|
| Performance | Improved optimizer statistics, index-only scans, shared row locking |
| SQL Features | ANSI SQL FULL OUTER JOIN, multi-row VALUES lists, DROP IF EXISTS |
| Monitoring | More detailed statistics in pg_stat views, log_line_prefix enhancements |
| Administration | Warm standby improvements, forced idle-session disconnect |
| Internationalization | Full-text search support for more languages |
How did performance improve in 8.2?
The optimizer got significantly smarter about handling complex queries. It now collects statistics on the correlation of column values to their physical row order, which helps it choose better plans for indexed queries.
Index-only scans are a big deal for read-heavy workloads. If a query only needs data that's already in the index, the executor can now skip the heap fetch entirely. This cuts I/O overhead substantially.
Shared row locking reduces contention in scenarios with many readers. Multiple transactions can now hold a shared lock on the same row, which is much more efficient than the previous row-level locking behavior.
What new SQL capabilities were added?
FULL OUTER JOIN finally arrived, closing a long-standing gap in PostgreSQL's SQL compliance. You can now perform complete outer joins natively without workarounds.
The VALUES clause got a major upgrade. You can now use it to insert multiple rows in a single statement, making it perfect for batch operations or generating test data on the fly.
DROP IF EXISTS syntax prevents errors in scripts. Instead of checking if an object exists before dropping it, you
can just use DROP TABLE IF EXISTS temp_data; and avoid the conditional logic.
How is monitoring better in this release?
The pg_stat* views now track more detailed information about database activity. You get better
visibility into what's happening with tables, indexes, and background writer processes.
log_line_prefix gained new escape sequences for more flexible logging. You can include the database
name, remote host/port, and command tag in your log output, which makes parsing and analysis much easier.
In practice, these changes make it simpler to diagnose performance bottlenecks and track down problematic queries without third-party tools.
What administration features were enhanced?
Warm standby functionality became more robust. The changes reduce the window where a standby might need full resynchronization after a failure, making warm standby setups more practical for production use.
A new idle_in_transaction_session_timeout parameter helps clean up stuck connections. This
automatically disconnects sessions that stay idle in a transaction for too long, preventing them from holding
locks indefinitely.
These are operational improvements that DBAs requested for years. They help maintain system health without constant manual intervention.
FAQ
Does 8.2 require a dump/restore upgrade?
Yes, a full dump and restore is required when
upgrading from prior major versions. The on-disk format changed to support the new features.
Can I use index-only scans with any index?
They work with B-tree indexes initially. The
feature requires that the index contains all columns needed by the query.
What languages were added to full-text search?
Turkish, Danish, and other language
configurations gained full-text search support through new dictionary templates.
Is the new DROP IF EXISTS syntax transactional?
Yes, it behaves like other DDL statements in
PostgreSQL. If the transaction rolls back, the drop operation is cancelled.
How does the new row locking affect application logic?
Applications should work unchanged.
The shared locking is backward compatible but reduces contention for read-heavy workloads.