pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Browne <cbbrowne@acm.org>
To: pgsql-admin@postgresql.org
Subject: Re: Enhancement request
Date: Fri, 30 Nov 2007 17:23:25 -0500
Message-ID: <60bq9b5q5e.fsf@dba2.int.libertyrms.com> (raw)
References: <B10E6810AC2A2F4EA7550D072CDE8760197E2C@SAB-FENWICK.sab.uiuc.edu>
	<36e682920711301218m703b3c67s6f547fd7b9b60e7c@mail.gmail.com>
	<7099.1196458205@sss.pgh.pa.us>
	<36e682920711301332q1cce5db9qe44fb068fcd5608d@mail.gmail.com>

jonah.harris@gmail.com ("Jonah H. Harris") writes:
> On Nov 30, 2007 4:30 PM, Tom Lane <tgl@sss.pgh.pa.us> 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 <jstevens@samoyed.ftc.nrcs.usda.gov> 



view thread (45+ messages)  latest in thread

Message-ID: <60bq9b5q5e.fsf@dba2.int.libertyrms.com>
Permalink:  ../60bq9b5q5e.fsf@dba2.int.libertyrms.com/
Also on:    postgresql.org/message-id/60bq9b5q5e.fsf@dba2.int.libertyrms.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: cbbrowne@acm.org
  Subject: Re: Enhancement request
  In-Reply-To: <60bq9b5q5e.fsf@dba2.int.libertyrms.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox