Repository navigation
Revert the query_store_stats compress_orderby - #2379
Conversation
|
Reviewed. This is a clean, mechanical revert of #2377:
The PR body's own analysis (bloom-vs-minmax sparse index conflict on No correctness, security, or parity issues found. |
Reverts #2377. Refs #2378.
The soak found it: on a store with chunks already compressed under the old settings,
compress_chunk(chunk, recompress => true)fails withThe existing compressed form of
query_idcarries a bloom sparse index, created when it was an ordinary column, and TimescaleDB will not have both that and the minmax index it adds automatically for an orderby column.Why revert rather than document around it
query_store_backfill_enabledis true on the use1 store, and three of its fivequery_store_statschunks (08-15, 08-16, 08-17) are compressed under the old settings. Late Query Store intervals landing in one of those chunks is a path that reaches automatic recompression — so this is reachable rather than theoretical, and the failure would be in ingestion rather than in a manual command someone chose to run.Against that: the benefit is new-chunks-only, and the measured 2.9x is synthetic against a table that already sits at 4.5x, so the real-world gain is smaller than the headline. A storage optimisation is not worth carrying an unquantified ingestion risk into a release. The finding stands and the work is not wasted — #2378 keeps it, and it can return once the bloom interaction is handled.
The revert is only half of it
Verified, and it is the part that would have been missed: re-applying the pre-#2377 statement does NOT clear the orderby.
ALTER ... SET (compress, compress_segmentby = ...)leaves an existingcompress_orderbyin place, so shipping this revert alone would leave every already-upgraded store exactly as broken as before while looking fixed.Clearing it needs the default stated explicitly, which then restores recompression:
No released version ever carried #2377 — it existed only on
devand the three soak boxes — so that reset is a one-time operation on those three stores rather than anything the product needs to ship. I am applying it there directly rather than adding a permanent un-do statement to the codebase for a state no customer install can be in.