Fixed an issue where the default fillfactor value for B-tree indexes was incorrect. #9648#9653
Fixed an issue where the default fillfactor value for B-tree indexes was incorrect. #9648#9653pravesh-sharma wants to merge 2 commits intopgadmin-org:masterfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 WalkthroughChange default fillfactor handling: B-tree default reduced from 100 to 90, hash default set to 75, and spgist default set to 90 across index properties templates and corresponding test SQL files. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/11_plus/properties.sql`:
- Around line 47-48: The CASE branch defaults for index fillfactor are wrong:
update the WHEN 'hash' and WHEN 'spgist' branches in the properties.sql CASE
that returns default fillfactor so that 'hash' returns 75 and 'spgist' returns
80 (replace the current 90 values in the WHEN 'hash' and WHEN 'spgist' cases) to
match PostgreSQL's HASH_DEFAULT_FILLFACTOR and SPGIST_DEFAULT_FILLFACTOR.
---
Duplicate comments:
In
`@web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/13_plus/properties.sql`:
- Around line 53-54: The CASE branch defaults for index access methods are
incorrect: change the WHEN 'hash' THEN 90 branch to WHEN 'hash' THEN 75 to match
PostgreSQL's actual default, and verify/correct the WHEN 'spgist' THEN 90 branch
to whatever PostgreSQL's SP-GiST default is (update the WHEN 'spgist' THEN
<correct_value> accordingly); locate these clauses by searching for the WHEN
'hash' and WHEN 'spgist' branches in the properties.sql CASE that maps access
methods to default fillfactor values and update the numeric literals to the
verified defaults.
In
`@web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/15_plus/properties.sql`:
- Around line 54-55: Update the default cost for the 'hash' index type in the
SQL templates so all versions use the correct value: replace the WHEN 'hash'
THEN 90 occurrence in templates 11_plus, 13_plus and 15_plus (the WHEN 'hash'
THEN branches in properties.sql) with the intended default (use 100 to match the
other templates), ensuring the WHEN 'spgist' THEN 90 entry remains unchanged.
.../server_groups/servers/databases/schemas/tables/templates/indexes/sql/11_plus/properties.sql
Outdated
Show resolved
Hide resolved
| CASE am.amname | ||
| WHEN 'btree' THEN 100 | ||
| WHEN 'gist' THEN 90 | ||
| WHEN 'btree' THEN 90 |
There was a problem hiding this comment.
GIN and BRIN are missing any reason?
RohitBhati8269
left a comment
There was a problem hiding this comment.
GIN and BRIN are missing any reason?
Summary by CodeRabbit