Re: "VACUUM FULL ANALYZE" vs. Autovacuum Contention - Mailing list pgsql-performance

From Greg Smith
Subject Re: "VACUUM FULL ANALYZE" vs. Autovacuum Contention
Date
Msg-id 4E173A8E.80900@2ndQuadrant.com
Whole thread Raw
In response to Re: "VACUUM FULL ANALYZE" vs. Autovacuum Contention  (D C <ptradingcom@gmail.com>)
List pgsql-performance
On 07/08/2011 12:46 PM, D C wrote:
> That said, it sounds like if we switched to daily "trucates" of each
> table (they can be purged entirely each day) rather than "delete
> froms", then there truly would not be any reason to use "vacuum
> full".  Does that sound plausible?


That's exactly right.  If you can re-arrange this data to be truncated
instead of deleted, this entire problem should go away.  There is also a
nice optimization you should know about; if you do this:

BEGIN;
TRUNCATE t;
COPY t FROM ...
COMMIT;

In single-node systems (no standby slave), this can work much faster
than a normal load.  It's able to skip the pg_xlog WAL writes in this
situation.

--
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
Comprehensive and Customized PostgreSQL Training Classes:
http://www.2ndquadrant.us/postgresql-training/


pgsql-performance by date:

Previous
From: D C
Date:
Subject: Re: "VACUUM FULL ANALYZE" vs. Autovacuum Contention
Next
From: Shaun Thomas
Date:
Subject: Just a note about column equivalence disarming the planner