Skip to content

B-Tree Index Fillfactor incorrectly reported as 100 instead of (default) 90 in SQL Pane & Properties #9648

@brsa

Description

@brsa

In pgAdmin4 v9.12, the SQL pane and the Index Properties dialog incorrectly report the FILLFACTOR for B-Tree indexes as 100 when no custom fillfactor has been set.

In PostgreSQL, the default FILLFACTOR for a B-Tree index is 90, not 100. By showing fillfactor=100 in the generated SQL, pgAdmin is misrepresenting the physical state of the database. If a user copies this SQL to recreate the index, they will inadvertently change the index's performance characteristics (reducing its "elbow room" and inducing page splits).

This has lead to a wild-goose chase for one of my clients, when I incorrectly (!) "accused" them of changing the fillfactor to 100. What an embarrassing waste of time!

Steps to Reproduce

Create a standard table and a B-Tree index without specifying any storage parameters:

CREATE TABLE test_fillfactor (id int, val text);
CREATE INDEX idx_test_default ON test_fillfactor(id);

Verify in the system catalog that reloptions is NULL (confirming the engine is using the default of 90):

SELECT relname, reloptions 
FROM pg_class 
WHERE relname = 'idx_test_default';
-- Result: reloptions is NULL

In pgAdmin, select the index idx_test_default in the Browser tree.
Open the SQL pane.
Open the Properties tab -> Options.

Expected Behavior

SQL Pane: Should NOT show fillfactor=100. It should either omit the WITH clause (matching pg_get_indexdef()) or correctly show fillfactor=90 if it must show defaults.

Properties Tab: Should show the default value of 90 (or leave the field blank).

Actual Behavior

SQL Pane: Displays WITH (fillfactor=100, deduplicate_items=True).

Properties Tab: Shows 100 in the Fillfactor field.

Environment

pgAdmin 4 Version: 9.12

PostgreSQL Version: 18 (or any)

Platform: Debian Linux (or any)

Regards
Erwin Brandstetter

Metadata

Metadata

Type

No type

Projects

Status

🏗 In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions