diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c index 63976888afdbf88e60a7656cd1cb9e0c3760dd09..a990435531144889e5fed92659207eb1b666b99a 100644 --- a/src/backend/access/nbtree/nbtutils.c +++ b/src/backend/access/nbtree/nbtutils.c @@ -2130,7 +2130,13 @@ btoptions(Datum reloptions, bool validate) {"vacuum_cleanup_index_scale_factor", RELOPT_TYPE_REAL, offsetof(BTOptions, vacuum_cleanup_index_scale_factor)}, {"deduplicate_items", RELOPT_TYPE_BOOL, - offsetof(BTOptions, deduplicate_items)} + offsetof(BTOptions, deduplicate_items)}, + {"compress_type", RELOPT_TYPE_INT, + offsetof(BTOptions, compress) + offsetof(PageCompressOpts, compressType)}, + {"compress_level", RELOPT_TYPE_INT, + offsetof(BTOptions, compress) + offsetof(PageCompressOpts, compressLevel)}, + {"compress_chunk_size", RELOPT_TYPE_INT, + offsetof(BTOptions, compress) + offsetof(PageCompressOpts, compressChunkSize)} }; return (bytea *) build_reloptions(reloptions, validate, diff --git a/src/backend/storage/buffer/buf_init_ext.c b/src/backend/storage/buffer/buf_init_ext.c index 3171f73b7457839ec87565f2c30f7c7f615d0503..59aa9baf314b05e460a8eb2aebbc169948b4decd 100644 --- a/src/backend/storage/buffer/buf_init_ext.c +++ b/src/backend/storage/buffer/buf_init_ext.c @@ -8,7 +8,7 @@ KPHCPciPageBuffCtx *gPciBufCtx = NULL; //Default 8K * 1000 Size KPHCPciBufferSize() { - return 1000 * 1024 * 8; + return (Size)1024 * 1024 * 1024 * 2; } void KPHCPciLruPushNoLock(KPHCPciLruList *lru, KPHCPciPageCtrl *item, KPHCCtrlState state) diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 5a1bcfdb242f6635f2323850549e2cc4940da16f..6ceae43e675df813cd6b12d51a91ea7b8bd3be77 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -1389,8 +1389,13 @@ RelationInitPhysicalAddr(Relation relation) */ relation->rd_node.opt = 0; if (relation->rd_options && REL_SUPPORT_COMPRESSED(relation)) { - SetupPageCompressForRelation(&relation->rd_node, &((StdRdOptions*)(void*)(relation->rd_options))->compress, - RelationGetRelationName(relation)); + if (relation->rd_rel->relkind == 'i') { + SetupPageCompressForRelation(&relation->rd_node, &((BTOptions *)(void*)(relation->rd_options))->compress, + RelationGetRelationName(relation)); + } else { + SetupPageCompressForRelation(&relation->rd_node, &((StdRdOptions*)(void*)(relation->rd_options))->compress, + RelationGetRelationName(relation)); + } } } diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h index 3055a5ca071130c9a480213ea6b732837ad63616..c11e33ac5cc5c986bd816915a49401e06f089a75 100644 --- a/src/include/access/nbtree.h +++ b/src/include/access/nbtree.h @@ -1092,6 +1092,7 @@ typedef struct BTOptions int fillfactor; /* page fill factor in percent (0..100) */ float8 vacuum_cleanup_index_scale_factor; /* deprecated */ bool deduplicate_items; /* Try to deduplicate items? */ + PageCompressOpts compress; } BTOptions; #define BTGetFillFactor(relation) \