The latest major version of PostgreSQL changes how database teams can do two jobs that are easy to put off: cleaning up a busy table and making sure an application sees the change a user just made. The open-source project released PostgreSQL 19 on Thursday. Both features give operators more control, but neither makes a production upgrade or a maintenance window disappear.
Consider an application with a large table that is updated throughout the day. PostgreSQL can reuse space left behind by ordinary updates and deletions, but in a heavily changed table the physical files can remain larger than the live data needs. A rewrite can reclaim space. The trouble is that holding an exclusive lock while rewriting a large table keeps regular reads and writes from proceeding.
Version 19's REPACK command can reclaim that space and, optionally, reorganize the table to follow an index. The change that matters for a live service is the concurrent mode. It builds replacement table and index files while regular reads and writes can continue, capturing and applying changes that arrive during the work. Without concurrent mode, REPACK takes its exclusive lock at the beginning and holds it throughout.
Concurrent does not mean lock-free. During most of the operation PostgreSQL holds a weaker lock that permits ordinary queries and writes, but it still needs an access-exclusive lock at the end. Once it gets that lock, it applies any remaining captured changes and swaps the files. The documentation says the lock is normally brief, with the duration depending on how much work accumulated while the lock was being acquired. Reads and writes can be blocked during that final phase.
A session-level lock timeout can limit how long the statement waits to acquire a lock; it does not limit how long an already acquired lock is held. That makes the time of day and the amount of write traffic relevant even with the new mode. The command also needs additional disk space. It cannot run concurrently on a partitioned parent table or an unlogged table, and it needs a primary key or an index-based replica identity to track rows.
The second change addresses a different problem with a familiar symptom. A user saves a change, then sees the old value on the next screen. If the write went to the primary database and the read went to an asynchronous replica, the replica may not have applied the change yet. Applications can avoid that by reading from the primary, but that limits how much work they can move to replicas.
Making a replica wait for a write
PostgreSQL 19 gives applications an opt-in alternative. After committing on the primary, the application obtains a position in the database's change log at or beyond the commit. It passes that position to the chosen standby and issues WAIT FOR LSN before the dependent read. In its default mode, success means the standby has applied changes through that point. The read has to run on that standby with a fresh snapshot; the server does not select the connection or change application routing automatically.
Teams also have to decide how long a user should wait. The command waits indefinitely if no positive timeout is specified. With a timeout, it raises an error unless the caller asks for a status instead. An application that receives a timeout can retry, report the delay or route that read to the primary rather than present stale data as current. This keeps the consistency decision on the reads that need it, without turning asynchronous replication into synchronous replication.
For existing installations, the migration notes are as important as the feature list. A major upgrade requires a migration method such as dump and restore, pg_upgrade or logical replication. Teams using pg_upgrade on certain databases with non-libc locale providers are advised to reindex full-text and trigram indexes and recompute stored text-search values. Version 19 also removes RADIUS authentication and switches just-in-time compilation off by default, changes worth testing before cutover.
PostgreSQL 19 gives teams a way to keep a table in use through most of a rewrite, and a way to wait for a replica without guessing how far behind it is. Testing both on the workload they actually run will tell operators more than the release announcement can about how much interruption they can avoid.



