Skip to content

Commit 0a1f3e1

Browse files
committed
Enable bool compression
This change sets the default for the GUC value: `timescaledb.enable_bool_compression=true`
1 parent c3bb352 commit 0a1f3e1

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

.unreleased/pr_8014

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Implements: #8014 enable bool compression by default by setting `timescaledb.enable_bool_compression=true`

src/guc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ TSDLLEXPORT bool ts_guc_default_hypercore_use_access_method = false;
154154
bool ts_guc_enable_chunk_skipping = false;
155155
TSDLLEXPORT bool ts_guc_enable_segmentwise_recompression = true;
156156
TSDLLEXPORT bool ts_guc_enable_exclusive_locking_recompression = false;
157-
TSDLLEXPORT bool ts_guc_enable_bool_compression = false;
157+
TSDLLEXPORT bool ts_guc_enable_bool_compression = true;
158158
TSDLLEXPORT int ts_guc_compression_batch_size_limit = 1000;
159159

160160
/* Only settable in debug mode for testing */
@@ -795,10 +795,10 @@ _guc_init(void)
795795
NULL);
796796

797797
DefineCustomBoolVariable(MAKE_EXTOPTION("enable_bool_compression"),
798-
"Enable experimental bool compression functionality",
798+
"Enable bool compression functionality",
799799
"Enable bool compression",
800800
&ts_guc_enable_bool_compression,
801-
false,
801+
true,
802802
PGC_USERSET,
803803
0,
804804
NULL,

tsl/src/nodes/decompress_chunk/compressed_batch.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,16 @@ decompress_column(DecompressContext *dcontext, DecompressBatchState *batch_state
221221
DecompressAllFunction decompress_all =
222222
tsl_get_decompress_all_function(header->compression_algorithm,
223223
column_description->typid);
224+
225+
if (decompress_all == NULL)
226+
{
227+
elog(ERROR,
228+
"bulk decompression not supported for compression algorithm %d / %s, and type %s",
229+
header->compression_algorithm,
230+
compression_get_algorithm_name(header->compression_algorithm),
231+
format_type_be(column_description->typid)
232+
);
233+
}
224234
Assert(decompress_all != NULL);
225235

226236
MemoryContext context_before_decompression =

0 commit comments

Comments
 (0)