SQLStreams

the messaging platform that is just Postgres

You last visited on 9999-99-99 Show what's new since then

compaction_read_cost [SQL0095]

Edit this page
code SQL0095 · alert — warn, owned by a stream; resolves once the count is back under the threshold
the log line · Report this thread
SQL0095 Alert

As it appears on __system.alerts:

compaction_read_cost

A compacted stream holds enough partitions that replaying a never-superseded key is a long scan.

A consumer replaying a key nothing has superseded scans from that key’s partition to the current tail. The cost grows with the partition count, about 10µs per partition, and never amortizes. The hourly check publishes an active alert after retained observations establish the configured pending duration above the threshold (two minutes by default); the alert’s data carries partition_count and threshold.

Compact more aggressively or lower retention so old partitions drop, which bounds the replay. The next run that finds the count under the threshold produces the resolution under the same key. Count and compaction applicability come from the same collected measurement. Missing or stale evidence cannot resolve the alert; see pending rules.

sqlstreams alert list
Nothing pasted yet — the queries above show their blanks.

Looking for a different code? Search every thread.