Re: Bloated indexes from pg_restore? (Was: Index fillfactor changed in pg9?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Glyn Astill <glynastill@xxxxxxxxxxx> writes:
> --- On Mon, 4/4/11, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
>>> So it appears now that if I restore the database using
>>> pg_restore, I end up with bloated indexes, which are fixed
>>> with a vacuum full.
>>> 
>>> The dump is a data only dump with the -Fc flag,

>> Data only dump?  Then what is the state of the
>> database you're restoring it into?

> It's a newly created database from a schema only dump.

So the difference is that you have initially-empty indexes that are
filled incrementally, whereas an ordinary dump-and-restore would be
creating fresh indexes.  Incremental filling of a btree is usually said
to result in about 66% fillfactor on average, 50% worst-case; whereas by
default I think we build fresh indexes at 90% fillfactor.  You didn't
say how much "bloat" you were seeing, but if it's less than 2X I think
this is just expected.  Unless the data is pretty static, it's useless
to hope that the fill factor will stay as high as 90% anyway.

			regards, tom lane

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux