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 1h9G9V-0005c1-UO for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Mar 2019 21:32:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h9G9U-0000vm-GQ for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Mar 2019 21:32:04 +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 1h9G9U-0000uc-19 for pgsql-hackers@lists.postgresql.org; Wed, 27 Mar 2019 21:32:04 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h9G9R-0003nq-4T for pgsql-hackers@lists.postgresql.org; Wed, 27 Mar 2019 21:32:02 +0000 Received: by mail-qt1-x841.google.com with SMTP id h39so20761280qte.2 for ; Wed, 27 Mar 2019 14:32:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=VERwgelHEZy+gWUnc99vgRYTpOUdF3ql2C2w+BWAFS4=; b=b/cbtj/DUAtjqvPdZ3Y18JXsxIkJnwfWrywiD2QBxqYhtkqZfUSu5x2p39Uex+XIwV YAZoHCOqL+eGc43+KBL9hBvsFTHO+/Y0OomENzBuhIIzIVAMs9hvRDwgafuMOVfCqhv+ ZcsP95Y9TCTcZbGK5KrKcic4sIR75Qaf8SU8HvNzd67bb7c+NnFKo4vQYH1MmVStV0bj oojRwpCN5ckrGwGV7WzPzmfwep9LvcyZAn99u/SXONWv/GlxMDVRzQBmlgg87abAna9+ JPp/P3wemS0eLSbu0x5ckc80C5JB8PIdgh7FhL2pbv7461SHoL+B1HzadbgYcQwb1gTf X+rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=VERwgelHEZy+gWUnc99vgRYTpOUdF3ql2C2w+BWAFS4=; b=QWfHN7KEuCieevJk77vGg5WDuMDiQ9lncI9LrP9eP8XV7GTrA7QiEMBgKDMQgCGxtW JVlwKL3yphnP9xuqhpKv1Hyood9WTn/1LO4Kmzojy+FlJim5R+GF8+ATv8EGlp5CzMzk L02kUlr8jC2zVEmahLj1z/Sv0qAsxlj1aNyzW2eRoktxzPSdaqItTzqMobhnabuvVQ3/ QMA2luSlqNX6cMZmCJZDcTcrc3UORPoZhiO0HTbWKpeE6QViqigNhbRoGRslnIeQPcXD owIdxSsBLitrjCg1r0ssNODKSto8DkufDfiCazHGNXhjkR10iP4CUvHwMuSJMVnEhTTg nJhQ== X-Gm-Message-State: APjAAAWvl0ea89wxb1oHokIpYZyQX6L6QOvPcl1ArfShWUwzQNm7mmD0 O+gVRwe6ODkYBPWotVSMalQaZw== X-Google-Smtp-Source: APXvYqzTPeA2ZIO8nCMkVTi/EBcfX0GnMST+C781sXhkfu0/2Z/JitUwvXcnp2i626lNicsR+NsUMw== X-Received: by 2002:aed:3f51:: with SMTP id q17mr32836855qtf.346.1553722320435; Wed, 27 Mar 2019 14:32:00 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([201.186.80.67]) by smtp.gmail.com with ESMTPSA id d17sm12513774qtl.43.2019.03.27.14.31.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2019 14:32:00 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 4DCFA120334; Wed, 27 Mar 2019 18:31:58 -0300 (-03) Date: Wed, 27 Mar 2019 18:31:58 -0300 From: Alvaro Herrera To: Darafei =?utf-8?B?IktvbdGPcGEi?= Praliaskouski Cc: PostgreSQL Developers Subject: Re: Berserk Autovacuum (let's save next Mandrill) Message-ID: <20190327213158.GA21065@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Mar-27, Darafei "Komяpa" Praliaskouski wrote: > Attached is sketch of small patch that fixes several edge cases with > autovacuum. Long story short autovacuum never comes to append only tables, > killing large productions. Yeah, autovac is not coping with these scenarios (and probably others). However, rather than taking your patch's idea verbatim, I think we should have autovacuum use separate actions for those two (wildly different) scenarios. For example: * certain tables would have some sort of partial scan that sets the visibility map. There's no reason to invoke the whole vacuuming machinery. I don't think this is limited to append-only tables, but rather those are just the ones that are affected the most. * tables nearing wraparound danger should use the (yet to be committed) option to skip index cleaning, which makes the cleanup action faster. Again, no need for complete vacuuming. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services