Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ah2in-000439-VY for pgsql-bugs@arkaria.postgresql.org; Fri, 18 Mar 2016 22:18:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ah2in-0002Lj-IH for pgsql-bugs@arkaria.postgresql.org; Fri, 18 Mar 2016 22:18:17 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ah2iA-0001eD-Am for pgsql-bugs@postgresql.org; Fri, 18 Mar 2016 22:17:38 +0000 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1ah2i2-0004MF-Rm for pgsql-bugs@postgresql.org; Fri, 18 Mar 2016 22:17:36 +0000 Received: by mail-wm0-x231.google.com with SMTP id l68so86450425wml.0 for ; Fri, 18 Mar 2016 15:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=5XQIh/ihCzfsWWuVrOUpaLkMOdRmnDQhC4t7QZTfruM=; b=K8iG2AH6fXzKBvTrJNs6TjiV9kHeue7Lhss3NPvqgd/ZRijDvLWB3Uy7YxIfAADIYE Ul/RX87+qfNfAI/XwMxovil4FHpqnBcum0hfFNT0oBsLM5VsgRCACWqny7KYsZmn26VW Nibyk9iqoLyDmsuIm0yosqkQY5IFgcHGx6VFWaNfYTMAtIjNJjK5ZqNWFu1+VV3Twm6Y E9hhCM9ASuquQ096Jlv5sj2ULXs6AmtwU5VAhrKLsRbr5o0mvEdj9S9a8+2YZ8/A0wfg 3IitVB57xwXNke2d/gDP2tRxCMwktKj1hg03XOiuXAhjmxhOsdj/mUx8tfoDXI+H8TOS 7Jig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=5XQIh/ihCzfsWWuVrOUpaLkMOdRmnDQhC4t7QZTfruM=; b=OFu16I3DPAIf8pyHQZpCi0Jgo97N9vaupFLZ5RwPwIOKKEDxHmiN6LKvuzPsz6gpyu lzfk3MStQy7ewG3ozkDM2cnmFwmQh115y/DIJiIEqCwBwa0dF+gM0AD1eZ4wvp+DeRdJ X15wy09Gj1YedsZbx0yfv0uEW19bgl8yALhf8f1ycVfFjtX/bPBANW2Hg4HFcZ1WnI0J FxTv6A3c14kgOOnoqrcAHd77PVxnrA8K0UtpKz8ZOvq8MXSBesqCPtTfVRvK/pIz5sA9 sntaVnBLCZjBNEjXE/f46GEZrCJngfNXKm1NXlhHixApVezRvmacvwd+xC6jE8GXxOym de9w== X-Gm-Message-State: AD7BkJJMRTL1pyH+BkcvCgNhC9t+7E1FTzRiX4cDcBBslm4QCGB5AhUF3NYuFx/V7w1OpoU3JCYHI+92flSLR1Q5rUpBEwYWWBErmGZfw9y0jHQmCIft8TUrdJs3lV5OBXqTS5Im0DMqJihJIiAS9Hms4vzPKyNz2dWN3+nELXMTu1qYsaczZmjAqv9o8Il5CI/urGA+ X-Received: by 10.194.2.169 with SMTP id 9mr18232405wjv.7.1458339448224; Fri, 18 Mar 2016 15:17:28 -0700 (PDT) Received: from [10.137.2.17] (ip-78-45-216-26.net.upcbroadband.cz. [78.45.216.26]) by smtp.gmail.com with ESMTPSA id za6sm14027605wjc.18.2016.03.18.15.17.27 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 Mar 2016 15:17:27 -0700 (PDT) Subject: Re: BUG #13750: Autovacuum slows down with large numbers of tables. More workers makes it slower. To: pgsql-bugs@postgresql.org References: <20160318221317.GA182976@alvherre.pgsql> From: Tomas Vondra Message-ID: Date: Fri, 18 Mar 2016 23:17:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Thunderbird/46.0a2 MIME-Version: 1.0 In-Reply-To: <20160318221317.GA182976@alvherre.pgsql> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Hi, On 03/18/2016 11:13 PM, Alvaro Herrera wrote: > David Gould wrote: > >> I have some thoughts for a different approach. In short, the stats collector >> actually knows what needs vacuuming because queries that create dead tuples >> tell it. I'm considering have the stats collector maintain a queue of >> vacuum work and that autovacuum request work from the stats collector. When I >> have something more concrete I'll post it on hackers. > > Hm, ideally we would have something backpatchable, but this new idea > doesn't sound so to me. I think that having some variant of the patch > you proposed previously would be better for the stable branches. I believe implementing such queue in the pgstat will be rather difficult, for example because you can tweak the limits in reloptions, and those are only accessible in the database. So pgstat does not know that and thus can't really decide what needs autovacuuming etc. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs