mirror of https://github.com/citusdata/citus.git
Columnar: few fixes (#4371)
* Columnar: fix a memory issue * Columnar: no need for deferred triggers * Columnar: relax memory growth constraintspull/4356/head
parent
a94e8c9cda
commit
feecb7b423
|
@ -112,7 +112,7 @@ CStoreBeginWrite(RelFileNode relfilenode,
|
|||
writeState->stripeWriteContext = stripeWriteContext;
|
||||
writeState->blockData = blockData;
|
||||
writeState->compressionBuffer = NULL;
|
||||
writeState->perTupleContext = AllocSetContextCreate(stripeWriteContext,
|
||||
writeState->perTupleContext = AllocSetContextCreate(CurrentMemoryContext,
|
||||
"CStore per tuple context",
|
||||
ALLOCSET_DEFAULT_SIZES);
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ CREATE TABLE cstore_skipnodes (
|
|||
exists_stream_length bigint NOT NULL,
|
||||
value_compression_type int NOT NULL,
|
||||
PRIMARY KEY (storageid, stripe, attr, block),
|
||||
FOREIGN KEY (storageid, stripe) REFERENCES cstore_stripes(storageid, stripe) ON DELETE CASCADE INITIALLY DEFERRED
|
||||
FOREIGN KEY (storageid, stripe) REFERENCES cstore_stripes(storageid, stripe) ON DELETE CASCADE
|
||||
) WITH (user_catalog_table = true);
|
||||
|
||||
COMMENT ON TABLE cstore_skipnodes IS 'CStore per block metadata';
|
||||
|
|
|
@ -81,7 +81,7 @@ write_clear_outside_xact | t
|
|||
INSERT INTO t
|
||||
SELECT i, 'last batch', 0 /* no need to record memusage per row */
|
||||
FROM generate_series(1, 50000) i;
|
||||
SELECT 1.0 * TopMemoryContext / :top_post BETWEEN 0.99 AND 1.01 AS top_growth_ok
|
||||
SELECT 1.0 * TopMemoryContext / :top_post BETWEEN 0.98 AND 1.02 AS top_growth_ok
|
||||
FROM column_store_memory_stats();
|
||||
-[ RECORD 1 ]-+--
|
||||
top_growth_ok | t
|
||||
|
|
|
@ -85,7 +85,7 @@ INSERT INTO t
|
|||
SELECT i, 'last batch', 0 /* no need to record memusage per row */
|
||||
FROM generate_series(1, 50000) i;
|
||||
|
||||
SELECT 1.0 * TopMemoryContext / :top_post BETWEEN 0.99 AND 1.01 AS top_growth_ok
|
||||
SELECT 1.0 * TopMemoryContext / :top_post BETWEEN 0.98 AND 1.02 AS top_growth_ok
|
||||
FROM column_store_memory_stats();
|
||||
|
||||
-- before this change, max mem usage while executing inserts was 28MB and
|
||||
|
|
Loading…
Reference in New Issue