Re: -Wformat-zero-length

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: -Wformat-zero-length
Date: 2012-08-10 20:38:46
Message-ID: 50257156.7060305@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 8/8/12 5:29 PM, Alvaro Herrera wrote:
> I think those 14 is a bit of a made-up number. Several of those steps
> are about building pg_upgrade, not actually using it. And there are
> some that are optional anyway.

Compare the pg_upgrade instructions

http://www.postgresql.org/docs/9.2/static/pgupgrade.html

to the old pg_dump-based upgrade instructions that we used to give people:

http://www.postgresql.org/docs/8.4/static/install-upgrading.html

They are about the same in complexity (the pg_dump approach didn't talk
about updating statistics or removing the old cluster, so it has less
steps).

So I don't think the number of steps is a problem at all. They could be
simplified a little bit more, of course.

What's more of a problem in my mind is the "unknown unknowns" in
pg_upgrade's approach. In the pg_dump/restore approach, you knew that
if the dump succeeded and the restore succeeded, your new database was
very likely good. The only problem could be that pg_dump forgot to dump
something altogether, or that there is a general problem in executing
SQL commands, both of which would be obvious problems. With pg_upgrade,
however, you never know whether your new instance is good. You could
notice problems months later. That's a really tough proposition.

> Another thing worth considering is to have pg_upgrade init, stop and
> start clusters as necessary instead of requesting the user to do it.
> I think this is two less steps.

Then you'd need to expose the entire pg_ctl shutdown mode logic through
pg_upgrade, which might not make things simpler.

> I wonder if things would be facilitated by having a config file for
> pg_upgrade to specify binary and PGDATA paths instead of having awkward
> command line switches.

If you want to do that, why not write a shell script? That's what they
are for.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2012-08-10 21:17:04 Fix for pg_upgrade with non-writeable cwd
Previous Message armin.schoeffmann 2012-08-10 19:59:22 Out of office