Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iRUDq-0008As-FI for pgsql-general@arkaria.postgresql.org; Mon, 04 Nov 2019 04:44:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iRUDo-0003lm-Oj for pgsql-general@arkaria.postgresql.org; Mon, 04 Nov 2019 04:44:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iRUDo-0003lf-C0 for pgsql-general@lists.postgresql.org; Mon, 04 Nov 2019 04:44:08 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iRUDh-0002iY-DT for pgsql-general@lists.postgresql.org; Mon, 04 Nov 2019 04:44:07 +0000 Received: by mail-wm1-x32b.google.com with SMTP id z26so1924665wmi.4 for ; Sun, 03 Nov 2019 20:44:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=itM/GMLRTnJNG6/EsJIBZXIMH7WcqewqoPDbeLafAfw=; b=YUOKIHrUyUHLOq1TYT8Jo9jQ1EdYjxVJqrlyznFdyInTj2uLwCCNIPG/6klsCyGiMI LIBTUkLqUbMkTkKAh7HCx71IGABhmWo7UQXXPxvELOUEfCkjnrYg/eobg/JElbjj+A8S CM/8xK0HtoO46tYdAJTkwLvBzlxYKQfRuZTlg37VYkQFkV8RUAzN7er9j1jIF7sYSH2c d2qeQPh5/hbUbPAxcCTLsGiIRRT2axrafLzJrBI9wJ5VM+xAJiIewRnQLVReXYxAUg/g gC36wTWOVyWMIRlMcvNrn0qBQO349ExFCNRuMUuWLrCzjhGrPqGMDvPhY3M7wUN3KLML ybhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=itM/GMLRTnJNG6/EsJIBZXIMH7WcqewqoPDbeLafAfw=; b=QQOtZu6XDpOawdDOBDCHFc/msefbkg7IJC54trNQVYUbVvsirQZm3ja6JQ74WC+aAD bXTWu336HFoU+jacgr/0PHDezA+0CD5xQ/yDvo6YsJKvi5g4ijYL96Ew1L77AgGIlION T+En6BjgaBc9bYvj05X7DAm/b0+p7MRI5NFbb/uiTPpk06kYKGeLIU/46QCnd90Qm0I2 tv2HXq73xeyxjAGOk8Sx2LVSYHD2BpfIWZjhGoMkSj5pO49fPaFNaSytQQtMx767OT0j H7AZMscfxKFC/KX/teX2H9FPNpVwPgz3cqk2ioaiYwZxzCJonDQdBW5pdUrU+vamx70X s+FA== X-Gm-Message-State: APjAAAXnTehzAWk7d8fl4XqYImc0yD9kvSaUKNsy9LF+jg08aY/DvZav +uWVQVt3mbFQdEIZ8nPMU9/gdO9Yh7A= X-Google-Smtp-Source: APXvYqzSZudGhfwU8ZEhYZ/h8hhd+Wq0HBQ21rxroJ82B6Q22ibDtnYtwoAT+tWl8sqPennchHHiIQ== X-Received: by 2002:a1c:2846:: with SMTP id o67mr21125992wmo.7.1572842639317; Sun, 03 Nov 2019 20:43:59 -0800 (PST) Received: from localhost.localdomain (217-149-168-182.nat.highway.telekom.at. [217.149.168.182]) by smtp.gmail.com with ESMTPSA id d11sm11964138wrn.28.2019.11.03.20.43.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2019 20:43:58 -0800 (PST) Message-ID: <1c8b7029f866d26516e32dd5843c0f4a807638d1.camel@cybertec.at> Subject: Re: Are my autovacuum settings too aggressive for this table? From: Laurenz Albe To: Jason Ralph , "pgsql-general@lists.postgresql.org" Date: Mon, 04 Nov 2019 05:43:58 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.4 (3.32.4-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, 2019-11-01 at 18:58 +0000, Jason Ralph wrote: > autovacuum_naptime = 1h > autovacuum_vacuum_threshold = 10000 > autovacuum_analyze_threshold = 5000 > autovacuum_vacuum_scale_factor = 0.002 > autovacuum_analyze_scale_factor = 0.001 These seem to be crazy settings. Only once an hour you test if a table needs autovacuum, and then you configure autovacuum to process tables all the time. There are only three autovacuum workers, so most of the tables won't get vacuumed. Please reset all these values to their default. If you want autovacuum to be more aggressive for a single table, run ALTER TABLE x SET (autovacuum_vacuum_cost_delay = 2); Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com