Skip to content

Commit 7199967

Browse files
Fixed an issue where the default fillfactor value for B-tree indexes was incorrect. #9648
1 parent 965a27d commit 7199967

File tree

9 files changed

+16
-9
lines changed

9 files changed

+16
-9
lines changed

web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/11_plus/create_btree_desc_null_first.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ CREATE UNIQUE INDEX IF NOT EXISTS "Idx_$%{}[]()&*^!@""'`\/#"
66
ON public.test_table_for_indexes USING btree
77
(id DESC NULLS FIRST, name COLLATE pg_catalog."POSIX" text_pattern_ops DESC NULLS FIRST)
88
INCLUDE(name, id)
9-
WITH (fillfactor=100)
9+
WITH (fillfactor=90)
1010
TABLESPACE pg_default;

web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/13_plus/alter_reset_fillfactor_cluster.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CREATE UNIQUE INDEX IF NOT EXISTS "Idx1_$%{}[]()&*^!@""'`\/#"
66
ON public.test_table_for_indexes USING btree
77
(id DESC NULLS FIRST, name COLLATE pg_catalog."POSIX" text_pattern_ops DESC NULLS FIRST)
88
INCLUDE(name, id)
9-
WITH (fillfactor=100, deduplicate_items=True)
9+
WITH (fillfactor=90, deduplicate_items=True)
1010
TABLESPACE pg_default;
1111

1212
COMMENT ON INDEX public."Idx1_$%{}[]()&*^!@""'`\/#"

web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/13_plus/create_btree_desc_null_first.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ CREATE UNIQUE INDEX IF NOT EXISTS "Idx_$%{}[]()&*^!@""'`\/#"
66
ON public.test_table_for_indexes USING btree
77
(id DESC NULLS FIRST, name COLLATE pg_catalog."POSIX" text_pattern_ops DESC NULLS FIRST)
88
INCLUDE(name, id)
9-
WITH (fillfactor=100, deduplicate_items=True)
9+
WITH (fillfactor=90, deduplicate_items=True)
1010
TABLESPACE pg_default;

web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/15_plus/alter_reset_fillfactor_cluster.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ CREATE UNIQUE INDEX IF NOT EXISTS "Idx1_$%{}[]()&*^!@""'`\/#"
77
(id DESC NULLS FIRST, name COLLATE pg_catalog."POSIX" text_pattern_ops DESC NULLS FIRST)
88
INCLUDE(name, id)
99
NULLS NOT DISTINCT
10-
WITH (fillfactor=100, deduplicate_items=True)
10+
WITH (fillfactor=90, deduplicate_items=True)
1111
TABLESPACE pg_default;
1212

1313
COMMENT ON INDEX public."Idx1_$%{}[]()&*^!@""'`\/#"

web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/15_plus/create_btree_desc_null_first.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ CREATE UNIQUE INDEX IF NOT EXISTS "Idx_$%{}[]()&*^!@""'`\/#"
77
(id DESC NULLS FIRST, name COLLATE pg_catalog."POSIX" text_pattern_ops DESC NULLS FIRST)
88
INCLUDE(name, id)
99
NULLS NOT DISTINCT
10-
WITH (fillfactor=100, deduplicate_items=True)
10+
WITH (fillfactor=90, deduplicate_items=True)
1111
TABLESPACE pg_default;

web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/default/create_hash_index.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
CREATE INDEX IF NOT EXISTS "Idx_$%{}[]()&*^!@""'`\/#"
66
ON public.test_table_for_indexes USING hash
77
(id)
8+
WITH (fillfactor=90)
89
TABLESPACE pg_default;

web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/11_plus/properties.sql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ SELECT DISTINCT ON (cls.relname)
4242
COALESCE(
4343
substring(array_to_string(cls.reloptions, ',') FROM 'fillfactor=([0-9]*)')::int,
4444
CASE am.amname
45-
WHEN 'btree' THEN 100
46-
WHEN 'gist' THEN 90
45+
WHEN 'btree' THEN 90
46+
WHEN 'gist' THEN 90
47+
WHEN 'hash' THEN 90
48+
WHEN 'spgist' THEN 90
4749
ELSE NULL
4850
END
4951
) AS fillfactor,

web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/13_plus/properties.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ SELECT DISTINCT ON (cls.relname)
4848
COALESCE(
4949
substring(array_to_string(cls.reloptions, ',') FROM 'fillfactor=([0-9]*)')::int,
5050
CASE am.amname
51-
WHEN 'btree' THEN 100
51+
WHEN 'btree' THEN 90
5252
WHEN 'gist' THEN 90
53+
WHEN 'hash' THEN 90
54+
WHEN 'spgist' THEN 90
5355
ELSE NULL
5456
END
5557
) AS fillfactor,

web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/15_plus/properties.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ SELECT DISTINCT ON (cls.relname)
4949
COALESCE(
5050
substring(array_to_string(cls.reloptions, ',') FROM 'fillfactor=([0-9]*)')::int,
5151
CASE am.amname
52-
WHEN 'btree' THEN 100
52+
WHEN 'btree' THEN 90
5353
WHEN 'gist' THEN 90
54+
WHEN 'hash' THEN 90
55+
WHEN 'spgist' THEN 90
5456
ELSE NULL
5557
END
5658
) AS fillfactor,

0 commit comments

Comments
 (0)