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?
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?
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;
VACUUM FULL
is fine - as documented in the Postgres Wiki by now. –
Springhalt VACUUM FULL
please. pg_repack
is doing same job without exclusive locks on table. aka online vacuum full github.com/reorg/pg_repack –
Yet ALTER TABLE foo SET ( fillfactor = 20);
VACUUM FULL foo;
View table options incl. fill factors
select t.relname as table_name,
t.reloptions
from pg_class t
join pg_namespace n on n.oid = t.relnamespace
where n.nspname = 'jxy'
and t.relname in ('xx', '')
;
Then
run pg_repack
© 2022 - 2024 — McMap. All rights reserved.