Columnar: set default compression as zstd if available

pull/4403/head
Hadi Moshayedi 2020-12-09 14:32:08 -08:00
parent 4985dcbafe
commit b3dac5e9d1
10 changed files with 20 additions and 1 deletions

View File

@ -24,10 +24,17 @@
#include "columnar/cstore.h"
/* Default values for option parameters */
#define DEFAULT_COMPRESSION_TYPE COMPRESSION_NONE
#define DEFAULT_STRIPE_ROW_COUNT 150000
#define DEFAULT_CHUNK_ROW_COUNT 10000
#if HAVE_LIBZSTD
#define DEFAULT_COMPRESSION_TYPE COMPRESSION_ZSTD
#elif HAVE_LIBLZ4
#define DEFAULT_COMPRESSION_TYPE COMPRESSION_LZ4
#else
#define DEFAULT_COMPRESSION_TYPE COMPRESSION_PG_LZ
#endif
int cstore_compression = DEFAULT_COMPRESSION_TYPE;
int cstore_stripe_row_count = DEFAULT_STRIPE_ROW_COUNT;
int cstore_chunk_row_count = DEFAULT_CHUNK_ROW_COUNT;

View File

@ -1,6 +1,7 @@
--
-- Testing we materialized views properly
--
SET columnar.compression TO 'none';
CREATE TABLE t(a int, b int) USING columnar;
INSERT INTO t SELECT floor(i / 4), 2 * i FROM generate_series(1, 10) i;
CREATE MATERIALIZED VIEW t_view(a, bsum, cnt) USING columnar AS

View File

@ -1,5 +1,6 @@
CREATE SCHEMA am_tableoptions;
SET search_path TO am_tableoptions;
SET columnar.compression TO 'none';
CREATE TABLE table_options (a int) USING columnar;
INSERT INTO table_options SELECT generate_series(1,100);
-- show table_options settings

View File

@ -1,3 +1,4 @@
SET columnar.compression TO 'none';
SELECT count(distinct storageid) AS columnar_table_count FROM columnar.columnar_stripes \gset
CREATE TABLE t(a int, b int) USING columnar;
CREATE VIEW t_stripes AS

View File

@ -1,3 +1,4 @@
SET columnar.compression TO 'none';
CREATE SCHEMA columnar_citus_integration;
SET search_path TO columnar_citus_integration;
SET citus.next_shard_id TO 20090000;

View File

@ -1,5 +1,6 @@
setup
{
SET columnar.compression TO 'none';
CREATE TABLE test_vacuum_vs_insert (a int, b int) USING columnar;
}

View File

@ -2,6 +2,8 @@
-- Testing we materialized views properly
--
SET columnar.compression TO 'none';
CREATE TABLE t(a int, b int) USING columnar;
INSERT INTO t SELECT floor(i / 4), 2 * i FROM generate_series(1, 10) i;

View File

@ -1,5 +1,6 @@
CREATE SCHEMA am_tableoptions;
SET search_path TO am_tableoptions;
SET columnar.compression TO 'none';
CREATE TABLE table_options (a int) USING columnar;
INSERT INTO table_options SELECT generate_series(1,100);

View File

@ -1,3 +1,5 @@
SET columnar.compression TO 'none';
SELECT count(distinct storageid) AS columnar_table_count FROM columnar.columnar_stripes \gset
CREATE TABLE t(a int, b int) USING columnar;

View File

@ -1,3 +1,5 @@
SET columnar.compression TO 'none';
CREATE SCHEMA columnar_citus_integration;
SET search_path TO columnar_citus_integration;
SET citus.next_shard_id TO 20090000;