Re: How to turnoff autovacuum - Mailing list pgsql-admin

From mark armon
Subject Re: How to turnoff autovacuum
Date
Msg-id CACh77r5YjeUFeC55WOj5d-y6HixT=JyNh+dnOttSZMxKj2ZDqQ@mail.gmail.com
Whole thread Raw
In response to Re: How to turnoff autovacuum  (Keith <keith@keithf4.com>)
Responses Re: How to turnoff autovacuum  (Wells Oliver <wells.oliver@gmail.com>)
List pgsql-admin
you got me. 
For the following tutorial purpose. I guess I am kind of getting it. The following are my thoughts. If is not correct, kindly spare time tell me.
  • turning off autovacuum. Now I need to clean old data to reclaim the disk space  by vacuum full 
Not sure about understanding the plain vacuum. example: table a has 1m rows with lower case string data.  data storage is 50MB.
  1. update by upper () function.
  2. step2. vacuum table a
  3. step3. delete 500000 row
  4. step4. vacuum table a
In step1, space is 100MB (one version of 50MB lower case string, one version of upper case string). 
In step2, the space is still 100MB. It's just to make some pages have content, then it clear the content, but the space is still there. 
in Step3, I guess the space would be 125MB. I guess it's just like a new version of the table a store there. 
In step4, I guess the space would be 100MB. 





On Dec 12, 2020, at 20:57, Keith <keith@keithf4.com> wrote:




On Sat, Dec 12, 2020 at 12:31 AM mark armon <1994hejian@gmail.com> wrote:

Just follow the tutorial. In the tutorial I need to set the autovacuum off. 
Here is how I set the autovacuum off. 
  1. Locate the postgresql.conf.  
  2. edit the postgresql.conf using notepad. As the picture attached. Previously it's on now it's off. 
  3. close and save postgresql.conf then open service-msc
  4. restart  the postgresql service. 
  5. open psql type: show autovacuum; 
But the result is ON. 

So that's my knowledge about  how to set the parameters. But it failed. So please tell me how to set the autovacuum off. 
image.png


I have to ask the question, why are you turning autovacuum off?  You do realize the consequences of doing so and are taking the necessary precautions of managing vacuuming yourself if you do so, correct?

Keith

pgsql-admin by date:

Previous
From: Tim Cross
Date:
Subject: Re: How to turnoff autovacuum
Next
From: Wells Oliver
Date:
Subject: Re: How to turnoff autovacuum