Re: VACUUM process running for a long time
Adrian von Bidder <avbidder@fortytwo.ch>
From: Adrian von Bidder <avbidder@fortytwo.ch>
To: pgsql-general@postgresql.org
Date: 2010-04-14T15:27:53Z
Lists: pgsql-general
On Wednesday 14 April 2010 16.01:39 Jan Krcmar wrote: > the documentation says, one should run VACUUM if there are many > changes in the database, but the vacuumdb never finishes sooner than > the new data should be imported. > > is there any technique that can solve this problem? -> vacuum can run concurrently to other stuff, so it's not necessary to wait before it finishes. -> in most cases, autovacuum should do the Right Thing(tm) atomatically, so you should not need to call vacuum manually. This is with a recent pg version. Do you use a (very) old version with autovacuum? Is your db server running hot and can't really keep up with inserting data as soon as vacuum starts running? Note that the pg documentation contains lots of useful information about tuning autovacuum. Without knowing how your table looks and how your data entry happens (in peaks? or always at about the same rate?) we probably can't help you much more. cheers -- vbi > > thanks > fous -- featured product: PostgreSQL - http://postgresql.org