Re: When does VACUUM FULL not clean out all deleted data?
От | Scott Marlowe |
---|---|
Тема | Re: When does VACUUM FULL not clean out all deleted data? |
Дата | |
Msg-id | dcc563d10801040902t15784c38vff8c91e3b9207a9c@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: When does VACUUM FULL not clean out all deleted data? (James Cloos <cloos@jhcloos.com>) |
Ответы |
Re: When does VACUUM FULL not clean out all deleted data?
Re: When does VACUUM FULL not clean out all deleted data? |
Список | pgsql-admin |
On Jan 4, 2008 9:35 AM, James Cloos <cloos@jhcloos.com> wrote: > >>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes: > > >> Why was the db using that extra five plus gigs? > > Tom> Smells like a hadn't-been-vacuuming-often-enough problem. > > Sorry, I forgot to mention: autovacuum was enabled and I also ran > this script every night via cron: > > #!/bin/bash > FULL='' > test $(date +%w) -eq 0 && FULL='FULL' > exec psql -U dbm -c "VACUUM ${FULL} VERBOSE ANALYZE" dbm Note that routine vacuum FULL is not a good idea actually. vacuum full is something you run when things have gone wrong (i.e. not enough regular vacuuming) and it is usually best followed by reindexing all your indexes. It's far better to keep track of bloat and run vacuum full, if at all, by hand, and only when needed. Running it regularly with no reindexing often results in index bloat which makes the database slower not faster.
В списке pgsql-admin по дате отправления: