Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 905
Daimon Avatar asked Nov 12 '10 00:11

Daimon


1 Answers

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;
like image 74
Frank Heikens Avatar answered Oct 20 '22 01:10

Frank Heikens