[Pkg-postgresql-public] pg_upgrade support in pg_upgradecluster
Peter Eisentraut
petere at debian.org
Thu Jul 26 10:26:29 UTC 2012
On tor, 2012-07-26 at 09:16 +0200, Christoph Berg wrote:
> Re: Martin Pitt 2012-07-25 <20120725161023.GL3264 at piware.de>
> > > Come to think of it, I like putting it into /var/log/postgresql and just
> > > leaving it there, as a kind of log output. Because there could be
> > > things in there that you might want to look at even if successful.
> > >
> > > But in terms of predictable file names, what do you suggest to do if
> > > someone runs the same upgrade several times, e.g., after failed
> > > attempts?
> >
> > I wouldn't consider them that precious; as the new cluster is either
> > automatically deleted (on failure) or manually deleted before
> > re-upgrading (if you aren't satisfied), there is little point in
> > keeping old upgrade logs around IMHO. If you think there is, I'd
> > rather append a date/time suffix than a nonce.
>
> Just append to the file instead of truncating it?
It's not a log file, it's a directory. pg_upgrade writes various files
to its current working directory. In case of an error, this could be a
text file with a list of things that the user needs to fix up manually.
If successful, this is a shell script to run analyze on the new
instance. In general, over several versions of pg_upgrade, it could be
anything.
The temporary directory under discussion would be made the current
directory when pg_upgrade is run.
It's debatable whether we want to keep the output in case of success.
It could be argued that pg_upgradecluster should be doing those things
that pg_upgrade outputs itself.
But in case of error I would like to keep the output from each run.
More information about the Pkg-postgresql-public
mailing list