A PostgreSQL extension stores mergeable latency histograms
pg_hdr_histogram is a new PostgreSQL extension that stores serialized HDR histograms and calculates latency percentiles such as p50 and p99.9 with bounded error. Its author says histograms can be merged across time windows and hosts without losing the distribution. The extension keeps them as SQL rows, so teams can query aggregated service latency inside PostgreSQL.
PostgreSQL · Oct 26, 2026
Why it matters
This gives database teams a way to preserve latency distributions for later analysis instead of storing only a few percentile values.
More context
The extension provides hdr_add to build a histogram from numeric samples and hdr_merge to combine stored histograms. It supports PostgreSQL 14–18 in its CI matrix and requires PostgreSQL server development headers, a C compiler and zlib; install it with CREATE EXTENSION hdr_histogram.
Keep in mind
This is the project's first 1.0 release. The roughly 0.1% precision and lossless-merge behavior are author-reported; no independent benchmark or production evaluation was available in the sources reviewed.
Original read