Re: ANALYZE after restore - Mailing list pgsql-hackers

From Scott Marlowe
Subject Re: ANALYZE after restore
Date
Msg-id Pine.LNX.4.33.0204041118180.13845-100000@css120.ihs.com
Whole thread Raw
In response to Re: ANALYZE after restore  (Hannu Krosing <hannu@krosing.net>)
List pgsql-hackers
On 3 Apr 2002, Hannu Krosing wrote:

> On Wed, 2002-04-03 at 06:52, Gavin Sherry wrote:
> > On Wed, 3 Apr 2002, Christopher Kings-Lynne wrote:
> > 
> > > Hi,
> > > 
> > > Would it be an idea to have pg_dump append an ANALYZE; command to the end of
> > > its dumps to assist newbies / inexperienced admins?
> > 
> > I do not think this is desired behaviour. Firstly, pg_dump is not just for
> > restoring data to the system. Presumably another flag would need to be
> > added to pg_dump to prevent an ANALYZE being appended.
> 
> Yes.
> 
> > This is messing and, in my opinion, it goes against the 'does what it says> it does' nature of Postgres.
> 
> What does pg_dump say it does ?

from man pg_dump:

pg_dump - extract a PostgreSQL database into a script file or other 
archive file

Pretty simple really.

I've been using postgresql for about three years now, and it only took me 
about 15  minutes of reading the docs to find the vacuum and vacuum 
analyze command.  It was far harder to figure out subselects, 
transactions, outer joins, unions, and a dozen other things than vacuum.  
I was a total database newbie back then, by the way.

One of the things I liked about postgresql was that it wasn't stuffed full 
of marketing fluff to try and impress the PHBs at the top of the corporate 
ladder, but was full of useful extensibility and was very much a "do what 
it said it would" database.

while I agree that postgresql could do with some automated housekeeping 
routines that would allow joe sixpack to grab it and go, no database that 
has real power is going to run very well without some administration, 
period.

The last place to put house keeping is in the end of my data dumps.  
pg_dump's job is to dump the data from my database in a format that is as 
transportable as possible.  not to hold my hand the next time I need to 
load data into my own database.  

While I fully support a switch like -z on pg_dump that puts an analyze on 
the end of my dumps if I so choose, I don't want them showing up 
automatically and me wondering if the data feeds I make for other will 
work.  

I can see junior dbas who don't understand vacuum and analyze recommending 
to people that they need to dump / restore their whole database once a 
week to get good performance if we add aht analyze switch to the end of 
the pg_dump file.  NOT a good thing.  :-)

anywho, I don't post much here, cause I don't hack postgresql that much, 
but I love this database, and I don't want it filled up with useless 
marketing cruft like analyze being haphazardly tacked onto the pg_dump 
output, so my vote is a great big NO.




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bidirectional hard joins (fwd)
Next
From: lamigo@atc.unican.es
Date:
Subject: Re: Problem compiling PostgreSQL 7.2 on IRIX 6.5.15f