X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id D4DCAD1C94D for ; Wed, 6 Aug 2003 04:36:24 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 76666-06 for ; Wed, 6 Aug 2003 01:35:03 -0300 (ADT) Received: from neuromancer.ctlno.com (unknown [208.13.35.90]) by svr1.postgresql.org (Postfix) with ESMTP id 9E13CD1C90E for ; Wed, 6 Aug 2003 01:36:13 -0300 (ADT) Received: from tocr (ool-4352919e.dyn.optonline.net [67.82.145.158]) by neuromancer.ctlno.com (8.11.6/8.11.2) with ESMTP id h764j7R30257; Tue, 5 Aug 2003 23:45:07 -0500 Subject: Re: Some vacuum & tuning help From: "Matthew T. O'Connor" To: Christopher Browne Cc: pgsql-performance@postgresql.org In-Reply-To: <60d6fjhjgf.fsf@dev6.int.libertyrms.info> References: <60d6fjhjgf.fsf@dev6.int.libertyrms.info> Content-Type: text/plain Organization: Zeut Tech Message-Id: <1060144572.17472.18.camel@zeutrh9> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.3 (1.4.3-1) Date: 06 Aug 2003 00:36:12 -0400 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/89 X-Sequence-Number: 2906 On Tue, 2003-08-05 at 17:40, Christopher Browne wrote: > Unfortunately, a "configurable-via-tables" pg_autovacuum is also going > to be quite different from the current "unconfigurable" version. true, however I would like to preserve the "unconfigured" functionality so that it can be run against a totally unmodified database cluster. If it finds configuration information on the server then it uses it, otherwise it just acts as it does now. > But at that point, it makes sense to add in quite a bit of > "configurable" behaviour, such as: > > -> Specifying that certain tables should _never_ be automatically > vacuumed. agreed > -> Establishing a "queue" of tables that pg_autovacuum plans to > vacuum, so that users could add in desired vacuums ("after the > other stuff being handled, force in a vacuum of app_table_foo"). > That way, vacuums can be 'forced in' without introducing the > possibility that multiple vacuums might be done at once... makes sense. > -> Making information about what vacuums have been done/planned > persistent across runs of pg_autovacuum, and even across > shutdowns of the DBMS. good. > This changes behaviour enough that I'm not sure it's the same > "program" as the unconfigurable version. Almost every option would be > substantially affected by the logic: > > if (CONFIG_DATA_IN_DB) { > /* Logic path that uses data in Vacuum Schema */ > } else { > /* More banal logic */ > } I'm not so sure it's that different. In either case we are going to have a threshold and decide to vacuum based on that threshold. The change is only that the data would be persistent, and could be customized on a per table basis. The logic only really changes if running unconfigured uses different data than the configured version, which I don't see as being proposed. > If I can store configuration in the database, then I'd like to also > make up a view or two, and possibly even base the logic used on views > that combine configuration tables with system views. In effect, that > makes for a _third_ radically different option. Not sure I see what all you are implying here. Please expand on this if you deem it worthy. I guess I'll start coding again. I'll send an email to the hackers list tomorrow evening with as much info / design as I can think of. Matthew