Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ahC87-0003Cj-UP for pgsql-bugs@arkaria.postgresql.org; Sat, 19 Mar 2016 08:21:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ahC87-0000WG-Cb for pgsql-bugs@arkaria.postgresql.org; Sat, 19 Mar 2016 08:21:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ahC7U-0008GR-KL for pgsql-bugs@postgresql.org; Sat, 19 Mar 2016 08:20:24 +0000 Received: from d.mail.sonic.net ([64.142.111.50]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ahC7N-00019n-Bh for pgsql-bugs@postgresql.org; Sat, 19 Mar 2016 08:20:24 +0000 Received: from engels (162-236-13-58.lightspeed.sntcca.sbcglobal.net [162.236.13.58]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id u2J8K6Gx001572 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA256 bits=128 verify=NOT); Sat, 19 Mar 2016 01:20:07 -0700 Date: Sat, 19 Mar 2016 01:20:09 -0700 From: David Gould To: Tom Lane Cc: Jim Nasby , Alvaro Herrera , Jeff Janes , Pg Bugs , Josh Berkus Subject: Re: BUG #13750: Autovacuum slows down with large numbers of tables. More workers makes it slower. Message-ID: <20160319012009.19ca590d@engels> In-Reply-To: <13348.1458339831@sss.pgh.pa.us> References: <20160302034537.0b1c2da7@engels> <20160315204026.GA29216@alvherre.pgsql> <20160315142816.5dca09dd@engels> <56EBAB26.4090905@BlueTreble.com> <16126.1458308374@sss.pgh.pa.us> <20160318150818.32982178@engels> <13348.1458339831@sss.pgh.pa.us> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVaaPPngjVdayw3SVilLoTAKQ0vCk0RXlW1E/XvjSxpyNPnIEgxvlKI0PT1Sfvg/xIFSvZFFELZ16CKzqikebCM4 X-Sonic-ID: C;qABaY6vt5RGHDI36ZLXa/Q== M;HISZY6vt5RGHDI36ZLXa/Q== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd 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 On Fri, 18 Mar 2016 18:23:51 -0400 Tom Lane wrote: > David Gould writes: > > 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. > > Uh, what? The autovacuum code already looks at the stats maintained by > the collector. If what you said means anything, it means "let's move the > autovac scheduling logic into the collector", which seems neither useful > nor sound from a modularity standpoint. Well, there is that. Thats why I'm still considering and not yet posting a concrete proposal on hackers. Really, there is no convenient location for this decision making as no single process has all the information needed to optimize autovacuum scheduling across databases. It's a bit of a puzzle. -dg -- David Gould 510 282 0869 daveg@sonic.net If simplicity worked, the world would be overrun with insects. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs