@@ -271,6 +271,11 @@ static bytea *
271
271
lsm3_options (Datum reloptions , bool validate )
272
272
{
273
273
static const relopt_parse_elt tab [] = {
274
+ {"fillfactor" , RELOPT_TYPE_INT , offsetof(BTOptions , fillfactor )},
275
+ {"vacuum_cleanup_index_scale_factor" , RELOPT_TYPE_REAL ,
276
+ offsetof(BTOptions , vacuum_cleanup_index_scale_factor )},
277
+ {"deduplicate_items" , RELOPT_TYPE_BOOL ,
278
+ offsetof(BTOptions , deduplicate_items )},
274
279
{"top_index_size" , RELOPT_TYPE_INT , offsetof(Lsm3Options , top_index_size )},
275
280
{"unique" , RELOPT_TYPE_BOOL , offsetof(Lsm3Options , unique )}
276
281
};
@@ -974,12 +979,22 @@ _PG_init(void)
974
979
NULL );
975
980
976
981
Lsm3ReloptKind = add_reloption_kind ();
982
+
977
983
add_bool_reloption (Lsm3ReloptKind , "unique" ,
978
984
"Index contains no duplicates" ,
979
985
false, AccessExclusiveLock );
980
986
add_int_reloption (Lsm3ReloptKind , "top_index_size" ,
981
987
"Size of top index (kb)" ,
982
988
0 , 0 , INT_MAX , AccessExclusiveLock );
989
+ add_int_reloption (Lsm3ReloptKind , "fillfactor" ,
990
+ "Packs btree index pages only to this percentage" ,
991
+ BTREE_DEFAULT_FILLFACTOR , BTREE_MIN_FILLFACTOR , 100 , ShareUpdateExclusiveLock );
992
+ add_real_reloption (Lsm3ReloptKind , "vacuum_cleanup_index_scale_factor" ,
993
+ "Packs btree index pages only to this percentage" ,
994
+ -1 , 0.0 , 1e10 , ShareUpdateExclusiveLock );
995
+ add_bool_reloption (Lsm3ReloptKind , "deduplicate_items" ,
996
+ "Enables \"deduplicate items\" feature for this btree index" ,
997
+ true, AccessExclusiveLock );
983
998
984
999
RequestAddinShmemSpace (hash_estimate_size (Lsm3MaxIndexes , sizeof (Lsm3DictEntry )));
985
1000
RequestNamedLWLockTranche ("lsm3" , 1 );
0 commit comments