Re: Enhancement request

Поиск
Список
Период
Сортировка
От Chris Browne
Тема Re: Enhancement request
Дата
Msg-id 60bq9b5q5e.fsf@dba2.int.libertyrms.com
обсуждение исходный текст
Ответ на Enhancement request  ("Campbell, Lance" <lance@uiuc.edu>)
Ответы Re: Enhancement request
Список pgsql-admin
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>

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Jonah H. Harris"
Дата:
Сообщение: Re: Enhancement request
Следующее
От: "Jonah H. Harris"
Дата:
Сообщение: Re: Enhancement request