Postgres week in the Netherlands: PGDay Lowlands & Percona Live 2026
Notes from PGDay Lowlands in Utrecht and Percona Live in Amsterdam, covering two ClickHouse-maintained Postgres extensions and several PostgreSQL 19 features. pg_clickhouse is a foreign data wrapper that lets unmodified Postgres queries and ORMs run against ClickHouse via pushdown, with 15 of 22 TPC-H queries fully pushed down. pg_stat_ch streams per-query execution events through a shared-memory ring buffer to ClickHouse without back-pressure. Also covered: the new PostgreSQL 19 plan-stabilization modules pg_plan_advice and pg_stash_advice, and PostgreSQL 19 monitoring changes including WAIT FOR, pg_stat_lock, wal_fpi_bytes, and log_lock_waits on by default.
Related posts
- What's New in pg_clickhouse v0.3.2: Postgres 19, TLS, Regex, and Memory
ClickHouse mediumAdept
pg_clickhouse v0.3.2, the Postgres extension for querying ClickHouse, adds support for PostgreSQL 19 Beta1 and needs no restart or ALTER EXTENSION UPDATE. New CREATE SERVER options cover TLS behavior (`secure` on/off/auto, `min_tls_version`) and native protocol compression. Regex flag pushdown has been corrected, with a mapping table and a warning that Postgres and ClickHouse treat negated character classes differently around newlines. The release also fixes memory ballooning in repeatedly re-scanned parameterized foreign scans and in unbuffered HTTP queries, pushes down capture-free regexp_match(), and fixes empty-array ANY() errors on older ClickHouse.
- Introducing pg_clickhouse: A Postgres extension for querying ClickHouse
ClickHouse mediumAdept
pg_clickhouse v0.1.0 is an Apache 2-licensed PostgreSQL foreign data wrapper, derived from clickhouse_fdw, that runs analytics queries on ClickHouse from Postgres so existing queries can work unmodified by changing search_path. It modernizes the code with PGXS builds, CI across PostgreSQL 13-18 and ClickHouse 22-25, TLS, and Bool/Decimal/JSON types. Its main advance is pushdown: ordered-set aggregates like percentile_cont() are rewritten to ClickHouse quantile() and FILTER clauses become -If combinators. SEMI JOIN pushdown plus planner cost tuning brought 21 of 22 TPC-H queries under 1s, with 12 fully pushed down.
- pg_stat_ch: a PostgreSQL extension that exports every metric to ClickHouse
ClickHouse hardMaster
pg_stat_ch is an open-source (Apache 2.0) PostgreSQL 16–18 extension that captures every statement execution, including failed queries and DDL, as a fixed-size ~4.6KB event with 45 fields and streams it to ClickHouse for APM-style analysis. On the hot path each backend memcpys the event into a cache-line-padded shared-memory ring buffer. A background worker flushes batches once a second over ClickHouse's native protocol with LZ4 compression, and materialized views handle all aggregation on the ClickHouse side. Key design choices are fixed-size events for predictable memory (query text is truncated at 2KB), dropping events instead of applying back-pressure, and a try-lock path with per-backend batching that cuts lock acquisitions about 5x. On pgbench TPC-B with 32 clients, extension code costs about 2% CPU but throughput drops about 11% because of contention on the enqueue lock.
- PostgreSQL + ClickHouse as the Open Source unified data stack
ClickHouse easyNovice
An open source stack pairs PostgreSQL as the transactional system of record with ClickHouse for analytics, connected by PeerDB for change data capture and the pg_clickhouse extension, which transparently offloads analytical queries from Postgres to ClickHouse. Two patterns are described: CDC replication for operational analytics on application data, and split-writes for high-volume logs, metrics and events that never need to live in Postgres. Adopting it involves creating a ClickHouse database, replicating via PeerDB, configuring pg_clickhouse and pointing queries at its tables, so application changes stay minimal. A managed version in ClickHouse Cloud swaps PeerDB for ClickPipes and preinstalls the extension.
- PostgreSQL 19 on ClickHouse Managed Postgres, from day one
ClickHouse mediumAdept
PostgreSQL 19 has been generally available on ClickHouse Managed Postgres since its November 2026 release day. That was possible because the service runs unforked community Postgres from the PGDG repository, builds VM images from release candidates with Ubicloud, gates the version behind a feature flag, and stress-tests HA failovers in staging. The post then covers the PostgreSQL 19 features that matter most for operators: REPACK CONCURRENTLY and its caveats (not MVCC-safe, a final ACCESS EXCLUSIVE lock, disk space needs), WAIT FOR LSN for read-your-writes on replicas, sequence replication and publication EXCEPT, parallel autovacuum index workers with scoring, and pg_plan_advice. A pgbench run with one synchronous standby showed about 2% higher TPS than PostgreSQL 18, and several defaults changed, including jit off, lz4 TOAST compression and max_locks_per_transaction at 128.