Re: auto truncate/vacuum full

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, JC Praud <brutaltruth42(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: auto truncate/vacuum full
Date: 2009-10-27 19:52:59
Message-ID: alpine.GSO.2.01.0910271546550.23266@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 27 Oct 2009, Alvaro Herrera wrote:

> Now 40 mins walking those pages to figure out that they need to be
> truncated, I concede that it's too much. Maybe we shouldn't be doing a
> backwards scan; perhaps this breaks the OS readahead and make it even
> slower.

I've watched that take hours before on a large table after purging
hundreds of gigabytes of old historical data. Improvements to speed that
up like scanning more efficiently would be welcome. But given the
potential for a really bad worst-case here, I have to wonder if this
really needs to get broken up into bits with finer locking instead of
micromanaging the details.

(Yes, I should have been using date-range partitioning instead and just
dropped the old partitions, but sometimes these things grow only after
you've made design decisions the wrong way)

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2009-10-27 20:02:28 Re: How to list a role's permissions for a given relation?
Previous Message Richard Huxton 2009-10-27 19:50:58 Re: indexing