Re: [GENERAL] temporarily disable autovacuum on a database or server ? - Mailing list pgsql-general

From Melvin Davidson
Subject Re: [GENERAL] temporarily disable autovacuum on a database or server ?
Date
Msg-id CANu8Fiy+qbiGThCHJXsDg7Ukfs3Sfz_kfC4b0t+NfQyreDNaTw@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] temporarily disable autovacuum on a database or server ?  (Jonathan Vanasco <postgres@2xlp.com>)
List pgsql-general

On Thu, Jan 12, 2017 at 12:09 PM, Jonathan Vanasco <postgres@2xlp.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
to
autovacuum = 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
to
autovacuum = 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.

pgsql-general by date:

Previous
From: Andreas Terrius
Date:
Subject: [GENERAL] Timestamp index not being hit
Next
From: Jonathan Vanasco
Date:
Subject: Re: [GENERAL] efficiently migrating 'old' data from one table to another