Re: temporarily disable autovacuum on a database or server ?

From: Melvin Davidson <melvin6925(at)gmail(dot)com>
To: Jonathan Vanasco <postgres(at)2xlp(dot)com>
Cc: pgsql-general general <pgsql-general(at)postgresql(dot)org>
Subject: Re: temporarily disable autovacuum on a database or server ?
Date: 2017-01-13 15:42:07
Message-ID: CANu8Fiy+qbiGThCHJXsDg7Ukfs3Sfz_kfC4b0t+NfQyreDNaTw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jan 12, 2017 at 12:09 PM, Jonathan Vanasco <postgres(at)2xlp(dot)com>
wrote:

>
> On Jan 11, 2017, at 8:19 PM, Melvin Davidson wrote:
>
>
>>
> *Yes, you're right about ALTER SYSTER. Unfortunately, the op provided
> neither PostgreSQL version or O/S, so we can't even be sure that is *
> *an option. That is why I stated "I cannot confirm".*
>
>
>
> I didn't think that would matter, but postgres 9.6.1 and ubuntu 16.04
>
> anyways, thanks. i'll test that approach.
>
>
>

*Jonathan,*

*I've tested this in PostgreSQL 9.4.6, so it should work for 9.6.1 also*

*Edit the postgresql.conf and change #autovacuum = on*

*toautovacuum = off*

*and save it.*

*Then psql -U postgres -c "SELECT pg_reload_conf();"*

*No need to restart postgres.*
After you finish your processing, do not forget to re-edit postgresql.conf
and change

*autovacuum = off*

*toautovacuum = on*

*save and*

*psql -U postgres -c "SELECT pg_reload_conf();"*

--

*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

Browse pgsql-general by date

  From Date Subject
Next Message Jonathan Vanasco 2017-01-13 15:42:20 Re: efficiently migrating 'old' data from one table to another
Previous Message Andreas Terrius 2017-01-13 09:52:59 Timestamp index not being hit