Re: Fighting the autovacuumer (to prevent wraparound)

From: Michael Graham <mgraham(at)bloxx(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Fighting the autovacuumer (to prevent wraparound)
Date: 2013-10-03 19:18:06
Message-ID: 1380827886.16581.82.camel@smokey
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2013-10-03 at 11:53 -0700, bricklen wrote:
>
> On Thu, Oct 3, 2013 at 11:48 AM, Michael Graham <mgraham(at)bloxx(dot)com>
> wrote:
> Hi all,
>
> We partition the data in postgres in a per-month basis and run
> a script
> to delete old partitions.
>
>
> Does "delete" = "drop"?

No I'm truncating the tables for that partition (sorry I should have
made that clear in my original message).

> Sometimes this script fails and the delete
> doesn't happen because of a deadlock, today I noticed that it
> was the
> autovacuumer that fighting with the script.
>
>
> Are you uninheriting the partition before attempting to get rid of it?
> Eg.
>
> ALTER TABLE your_partition NO INHERIT the_parent_table;

I'm not no, will that help? I see that the autovacuumer is vacuuming
the actual partition that I want to truncate to the parent but I do do
an analyse on the parent table after the truncate but in the same
transaction.

Thanks,
--
Michael Graham <mgraham(at)bloxx(dot)com>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2013-10-03 19:24:04 Re: Fighting the autovacuumer (to prevent wraparound)
Previous Message bricklen 2013-10-03 18:53:06 Re: Fighting the autovacuumer (to prevent wraparound)