---
title: "PostgreSQL 19 on ClickHouse Managed Postgres, from day one"
description: "ClickHouse Managed Postgres made PostgreSQL 19 generally available on its release day, November 19, 2026, without a preview or waitlist. The engineering team leveraged the PGDG APT repository for the Postgres server and third-party extensions, packaging only first-party extensions themselves. A readiness checklist, VM images built from RC2, extension packaging, control plane feature flags, and end-to-end stress testing across AWS and GCP enabled the rapid rollout. Key PostgreSQL 19 features include the REPACK command with a CONCURRENTLY option for online table rewrites, the WAIT FOR LSN command for read-your-writes on replicas, logical replication improvements for sequences and EXCEPT, and the pg_plan_advice extension for plan stabilization. Performance benchmarks showed stable or slightly improved TPS compared to PostgreSQL 18, with new defaults such as jit off and lz4 compression."
---

# PostgreSQL 19 on ClickHouse Managed Postgres, from day one

[Clickhouse](https://yomu.fyi/company/clickhouse) · Andrey Chudnovskiy, David Wheeler and Gülçin Yıldırım Jelínek · Nov 24, 2026

**Type:** Explainer

## Summary

ClickHouse Managed Postgres made PostgreSQL 19 generally available on its release day, November 19, 2026, without a preview or waitlist. The engineering team leveraged the PGDG APT repository for the Postgres server and third-party extensions, packaging only first-party extensions themselves. A readiness checklist, VM images built from RC2, extension packaging, control plane feature flags, and end-to-end stress testing across AWS and GCP enabled the rapid rollout. Key PostgreSQL 19 features include the REPACK command with a CONCURRENTLY option for online table rewrites, the WAIT FOR LSN command for read-your-writes on replicas, logical replication improvements for sequences and EXCEPT, and the pg\_plan\_advice extension for plan stabilization. Performance benchmarks showed stable or slightly improved TPS compared to PostgreSQL 18, with new defaults such as jit off and lz4 compression.

## Context

ClickHouse Managed Postgres is a fully managed PostgreSQL service that aims to provide the latest PostgreSQL versions immediately upon release. The post details the engineering process behind achieving day-one support for PostgreSQL 19, highlights new features, and explains their implications for the managed service.

## Approach / What changed

The team used the PGDG APT repository for the Postgres server and third-party extensions, packaging only first-party extensions. They prepared VM images from PostgreSQL 19 RC2 with Ubicloud, set up control plane feature flags, and ran end-to-end stress tests across AWS and GCP covering HA, scaling, read replicas, telemetry, and billing. The separation of control plane and VM image deployments allowed rapid production rollout after validation.

## Takeaways

- REPACK CONCURRENTLY allows online table rewrites with minimal locking but requires free disk space and has limitations: it is not MVCC-safe, does not work on partitioned tables or tables without a primary key, and can fail if more than about 104 million rows change or DDL runs concurrently.
- WAIT FOR LSN enables read-your-writes on asynchronous replicas without making every commit wait, but requires setting a TIMEOUT and a fallback plan; for sub-second lag, streaming replication is available through support.
- pg\_plan\_advice allows plan stabilization but should be used cautiously because the planner usually makes good decisions and pinned plans can backfire when data changes; stashes in pg\_stash\_advice are cleared on restart.

## FAQ

### How does REPACK CONCURRENTLY work and what are its limitations?

REPACK CONCURRENTLY rewrites a table under a SHARE UPDATE EXCLUSIVE lock, capturing changes with logical decoding, and takes ACCESS EXCLUSIVE only for the final swap. It is not MVCC-safe, requires free disk space, does not work on partitioned tables or tables without a primary key, and can fail if too many rows change or DDL runs concurrently.

### How can I achieve read-your-writes on a read replica?

Use the WAIT FOR LSN command on the replica to wait until WAL has been replayed to a specific LSN. Set a TIMEOUT and decide what to do on expiration, such as falling back to the primary. For sub-second lag, streaming replication is available through support.

### How does pg\_plan\_advice work and how can I use it on ClickHouse Managed Postgres?

pg\_plan\_advice allows you to supply a plan for a query, which the planner will use if it matches. It ships with contrib modules and can be loaded per session via LOAD or session\_preload\_libraries. For application roles, set session\_preload\_libraries via ALTER ROLE. pg\_stash\_advice stores stashes in shared memory, but they are cleared on restart.

**Tags:** [ClickHouse](https://yomu.fyi/topic/clickhouse), [Managed Postgres](https://yomu.fyi/topic/managed-postgres), [Postgres](https://yomu.fyi/topic/postgres), [Replication](https://yomu.fyi/topic/replication)

- Source: [Clickhouse](https://clickhouse.com/blog/postgresql-19-on-clickhouse-managed-postgres-from-day-one)
- Source URL: https://clickhouse.com/blog/postgresql-19-on-clickhouse-managed-postgres-from-day-one
- Ingested by Yomu: 2026-11-24T12:00:15.020Z

[Read original post](https://clickhouse.com/blog/postgresql-19-on-clickhouse-managed-postgres-from-day-one)
