Re: Why does analyze_new_cluster.sh use sleep? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Why does analyze_new_cluster.sh use sleep?
Date
Msg-id 1345778106.9270.2.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: Why does analyze_new_cluster.sh use sleep?  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Why does analyze_new_cluster.sh use sleep?
List pgsql-hackers
On Thu, 2012-08-23 at 17:05 -0400, Bruce Momjian wrote:
> On Thu, Aug 23, 2012 at 02:17:44AM -0400, Peter Eisentraut wrote:
> > The script analyze_new_cluster.sh output by pg_upgrade contains several
> > "sleep" calls (see contrib/pg_upgrade/check.c).  What is the point of
> > this?  If the purpose of this script is to get the database operational
> > again as soon as possible, waiting a few seconds doing nothing surely
> > isn't helping.
> > 
> > I could maybe see the point of waiting a bit between the different
> > vacuumdb calls, to catch some breath, but the one before the first call
> > to vacuumdb is highly dubious to me.
> 
> The sleep is there so the user can read the status message, in case it
> scrolls off the screen once the next stage starts.

That seems completely arbitrary and contrary to the point of the script.
The pg_upgrade output already explains what the script is for.  If we
really wanted the user to confirm what is going to happen, we should
wait for a key press or something.  I also don't think that 2 seconds is
enough to read and react to the written text.  Also, by that logic, we
need to put a delay between each database processed by vacuumdb as well.





pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: default_isolation_level='serializable' crashes on Windows
Next
From: Peter Eisentraut
Date:
Subject: Re: size of .po changesets