Re: How to disable the autovacuum ?

From: Esteban Zimanyi <ezimanyi(at)ulb(dot)ac(dot)be>
To: Christoph Moench-Tegeder <cmt(at)burggraben(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: How to disable the autovacuum ?
Date: 2021-05-31 09:32:19
Message-ID: CAPqRbE6xZNVgXBQO5trbxvqh8whmiiJGS1VKPUS2fbHuMQpa2A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)2001-05-31 20:25:00+02
2 f(at)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(at)burggraben(dot)net> wrote:

> ## Esteban Zimanyi (ezimanyi(at)ulb(dot)ac(dot)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
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message tanghy.fnst@fujitsu.com 2021-05-31 10:03:54 RE: [BUG]Update Toast data failure in logical replication
Previous Message Magnus Hagander 2021-05-31 09:31:07 Re: Fix RADIUS error reporting in hba file parsing