From: | Chris Ernst <cernst(at)zvelo(dot)com> |
---|---|
To: | Job <Job(at)colliniconsulting(dot)it>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Vacuum full: alternatives? |
Date: | 2016-06-20 15:46:07 |
Message-ID: | 08321341-c7cf-e6f8-a7e8-ac31d600118c@zvelo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 06/20/2016 03:18 AM, Job wrote:
> Hello,
>
> we have a table with an heavy traffic of pg_bulkload and delete of records.
> The size pass, in only one day, for example for 1Gb to 4Gb and then 1Gb back.
>
> We have important problems on size and the only way to gain free space is issueing a vacuum full <table>.
> But the operation is very slow, sometimes 2/4 hours, and table is not available for services as it is locked.
>
> We do not delete everything at one (in this case the truncate woudl resolve the problem).
>
> The autovacuum is not able (same for normal vacuum) to free the spaces.
>
> Are there some suggestions or another way to manage this?
Hi Francesco,
We use pg_repack (http://reorg.github.io/pg_repack/) for a similar
workload. It allows what amounts to an online vacuum full. The only
caveat is that you need to have the available disk space to fully
rebuild the table in parallel.
Hope that helps.
Cheers!
- Chris
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2016-06-20 15:51:41 | Re: R: Vacuum full: alternatives? |
Previous Message | John R Pierce | 2016-06-20 15:45:33 | Re: R: Vacuum full: alternatives? |