Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id C33DE2E00CA for ; Fri, 30 Nov 2007 19:48:28 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 94038-08 for ; Fri, 30 Nov 2007 19:48:24 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by postgresql.org (Postfix) with ESMTP id 668332E00C6 for ; Fri, 30 Nov 2007 19:48:28 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.1/8.14.1) with ESMTP id lAUNmN9U098151 for ; Fri, 30 Nov 2007 19:48:23 -0400 (AST) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.1/8.14.1/Submit) id lAUN3x5L080568 for pgsql-admin@postgresql.org; Fri, 30 Nov 2007 19:03:59 -0400 (AST) (envelope-from news) From: Chris Browne X-Newsgroups: pgsql.admin Subject: Re: Enhancement request Date: Fri, 30 Nov 2007 17:23:25 -0500 Organization: cbbrowne Computing Inc Lines: 56 Message-ID: <60bq9b5q5e.fsf@dba2.int.libertyrms.com> References: <36e682920711301218m703b3c67s6f547fd7b9b60e7c@mail.gmail.com> <7099.1196458205@sss.pgh.pa.us> <36e682920711301332q1cce5db9qe44fb068fcd5608d@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.21 (linux) Cancel-Lock: sha1:nQbZZs98hZWylTBC+D8tpOKPWXU= To: pgsql-admin@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/271 X-Sequence-Number: 27514 jonah.harris@gmail.com ("Jonah H. Harris") writes: > On Nov 30, 2007 4:30 PM, Tom Lane wrote: >> For what? > > Convenience. > >> AFAICS we are moving as fast as we can in the direction of auto vacuum >> and analyze. Adding more frammishes to the manual commands seems like >> gilding the buggy whip. > > Autovacuum will never be the be all end all. And why is does it not suffice to do the following? SCHEMA=billing for table in `psql -qt -d my_database -c "select table_name from information_schema.tables where table_schema = '${SCHEMA}' and table_type = 'BASE TABLE';"`; do psql -d my_database -c "vacuum analyze ${SCHEMA}.${table};" done I don't see a need to add more to the SQL grammar when the above can be done in 4 lines of shell script. It seems to me that if you actually *NEED* to do 'sophisticated logic-driven' VACUUMing, then you are already headed down a road where you will need to have: a) A script b) Some query criteria, whether in the DBMS, or purely within the shell, to handle the "logic" bit. Once you're there, you have *AT LEAST* the 4 lines of script that I suggested, if not considerably more. Interestingly, the .sig chosen below actually seems somewhat germaine to this... What you're asking for, whether it's "gilding the buggy whip" or "adding frammishes to manual commands" [1], is, in fact, MORE that you're suggesting it is. You're not merely looking for a "frammish," you're proposing that it is meaningful for us to encourage a policy of vacuuming on a per-schema basis. That's not merely a mechanism to let the user do what they want - that's policy. In contrast, while what is in my little script represents policy, as a whole, none of the components represent policies in and of themselves. Footnotes: [1] I *love* the way Tom phrased that; that sentence is going into my personal "fortunes" file... -- output = reverse("ofni.sesabatadxunil" "@" "enworbbc") http://www3.sympatico.ca/cbbrowne/languages.html People consistently decry X for doing precisely what it was designed to do: provide a mechanism to allow *OTHERS* to build GUI systems. -- John Stevens