Search code examples
postgresqlfillfactor

Changing fillfactor of existing table


Is it possible to change fillfactor of an existing table in PostgreSQL 8.4?

Or do I have to create copy of a table with new fillfactor - which is not the best approach because of foreign key problems?


Solution

  • Yes, that's possible. But you have to VACUUM FULL or CLUSTER this table afterwards to rewrite the table.

    ALTER TABLE foo SET ( fillfactor = 50);
    VACUUM FULL foo;