Re: How to stop autovacuum for daily partition old tables

From: Scott Mead <scottm(at)openscg(dot)com>
To: AI Rumman <rummandba(at)gmail(dot)com>
Cc: Melvin Davidson <melvin6925(at)gmail(dot)com>, pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to stop autovacuum for daily partition old tables
Date: 2016-01-21 02:00:22
Message-ID: 557660D0-F615-4D25-A1A8-794F892FDE27@openscg.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Jan 20, 2016, at 19:54, AI Rumman <rummandba(at)gmail(dot)com> wrote:
>
> But, will it not create transaction wraparound for those table?
>
> Thanks.
>
>> On Wed, Jan 20, 2016 at 4:44 PM, Melvin Davidson <melvin6925(at)gmail(dot)com> wrote:
>>
>> ALTER TABLE your_schema.your_table SET (autovacuum_enabled = false, toast.autovacuum_enabled = false);
>>
>>> On Wed, Jan 20, 2016 at 6:22 PM, AI Rumman <rummandba(at)gmail(dot)com> wrote:
>>> Hi,
>>>
>>> I have a table with daily partition schema on Postgresql 9.1 where we are keeping 2 years of data.
>>> Often I experience that autovacuum process is busy with old tables where there is no change. How can I stop it?
>>> Please advice.
>>>
I typically run a vacuum freeze in old partitions that don't get any changes as part of a maintenance script. If the tables actually get no changes, autovac should ignore them unless wrap becomes an issue at max_freeze_age... Which, it shouldn't of you vacuum freeze and there are no changes.

>>> Thanks.
>>
>>
>>
>> --
>> Melvin Davidson
>> I reserve the right to fantasize. Whether or not you
>> wish to share my fantasy is entirely up to you.
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andy Colson 2016-01-21 02:33:49 Re: long transfer time for binary data
Previous Message Adrian Klaver 2016-01-21 01:11:46 Re: How to stop autovacuum for daily partition old tables