Re: How to disable the autovacuum ? - Mailing list pgsql-hackers

From Esteban Zimanyi
Subject Re: How to disable the autovacuum ?
Date
Msg-id CAPqRbE6xZNVgXBQO5trbxvqh8whmiiJGS1VKPUS2fbHuMQpa2A@mail.gmail.com
Whole thread Raw
In response to Re: How to disable the autovacuum ?  (Christoph Moench-Tegeder <cmt@burggraben.net>)
Responses Re: How to disable the autovacuum ?
List pgsql-hackers
Dear Christoph

Many thanks for your prompt reply !

Is there a step-by-step procedure specified somewhere?

For example, before launching the tests there is a load.sql file that loads all the test tables. The file starts as follows

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
SET default_tablespace = '';
SET default_with_oids = false;

--
-- Name: tbl_tbool; Type: TABLE; Schema: public; Owner: -
--

DROP TABLE IF EXISTS public.tbl_tbool;
CREATE TABLE public.tbl_tbool (
    k integer,
    temp tbool
);
ALTER TABLE tbl_tbool SET (autovacuum_enabled = false); 

[... many more table definitions added after which the load of these tables starts ...]

COPY public.tbl_tbool (k,temp) FROM stdin;
1      f@2001-05-31 20:25:00+02
2      f@2001-06-13 00:50:00+02
[...]
\.

[... load of the other tables ...]  

I wonder whether this is the best way to do it, or whether it is better to disable the autovacuum at the beginning for all the tests

Thanks for your help !

On Mon, May 31, 2021 at 10:47 AM Christoph Moench-Tegeder <cmt@burggraben.net> wrote:
## Esteban Zimanyi (ezimanyi@ulb.ac.be):

> I have tried
> alter system set autovacuum = off;
> but it does not seem to work.

Did you reload the configuration ("SELECT pg_reload_conf()" etc) after
that? If not, that's your problem right there.

Regards,
Christoph

--
Spare Space

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Fix RADIUS error reporting in hba file parsing
Next
From: "tanghy.fnst@fujitsu.com"
Date:
Subject: RE: [BUG]Update Toast data failure in logical replication