Re: BUG #7815: Upgrading PostgreSQL from 9.1 to 9.2 with pg_upgrade/postgreql-setup fails - invalid status retrieve

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: giomac(at)gmail(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #7815: Upgrading PostgreSQL from 9.1 to 9.2 with pg_upgrade/postgreql-setup fails - invalid status retrieve
Date: 2013-01-19 16:27:28
Message-ID: 25216.1358612848@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Why is a clean shutdown important? If the server crashed, we would have
> committed transactions in the WAL files which are not transfered to the
> new server, and would be lost.

> I am hesistant to even start such an old server because pg_upgrade never
> modifies the old server. Even starting it in that case would be
> modifying it.

I'm not really following this logic. If the old cluster was in a
crashed state, why would we not expect that starting a postmaster would
be the best (only) way to repair the damage and make everything good
again? Isn't that exactly what the user would have to do anyway? What
other action would you expect him to take instead?

(But, at least with the type of packaging I'm using in Fedora, he would
first have to go through a package downgrade/reinstallation process,
because the packaging provides no simple scripted way of manually
starting the old postgres executable, only the new one. Moreover, what
pg_upgrade is printing provides no help in figuring out whether that's
the next step.)

I do sympathize with taking a paranoid attitude here, but I'm failing
to see what advantage there is in not attempting to start the old
postmaster. In the *only* case that pg_upgrade is successfully
protecting against with this logic, namely there's-an-active-postmaster-
already, the postmaster is equally able to protect itself. In other
cases it would be more helpful not less to let the postmaster analyze
the situation.

> The other problem is that if the server start fails, how do we know if
> the failure was due to a running postmaster?

Because we read the postmaster's log file, or at least tell the user to
do so. That report would be unambiguous, unlike pg_upgrade's.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2013-01-19 16:46:27 Re: Query to help in debugging
Previous Message Bruce Momjian 2013-01-19 16:05:12 Query to help in debugging

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2013-01-19 16:43:36 Re: Query to help in debugging
Previous Message Kevin Grittner 2013-01-19 16:20:19 Re: Query to help in debugging