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 05:47:03
Message-ID: 14955.1358574423@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:
> On Sat, Jan 19, 2013 at 12:02:31AM -0500, Tom Lane wrote:
>> In the meantime, I was wondering a bit why pg_upgrade looks at the
>> postmaster.pid file at all.

> The reason we check for postmaster.pid is so we can give the user a clue
> about which postmaster is running.

[ scratches head... ] I failed to detect any such clue in the error
message it prints. Had you printed the PID from the file, or even
better looked to see if that process was actually still alive, this
argument would be reasonable. But pg_upgrade does neither of those,
whereas if it had started a postmaster the postmaster would have done
both of those things.

> Also, we don't want to start on a non-clean shutdown, so the missing pid
> file tells us it was clean.

I agree that super paranoia is not unreasonable in pg_upgrade. But it
would be useful to print something similar to what the backend prints,
about checking whether PID N is still there and manually removing the
lock file if not. Or (ahem) you could let the existing backend-side
logic do that for you, rather than reimplementing that logic badly.

Meanwhile I still have to figure out how come the postmaster.pid file
is still there in the OP's case ...

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tsunezumi 2013-01-19 08:46:48 Re: BUG #7814: Rotation of the log is not carried out.
Previous Message Bruce Momjian 2013-01-19 05:15:49 Re: BUG #7815: Upgrading PostgreSQL from 9.1 to 9.2 with pg_upgrade/postgreql-setup fails - invalid status retrieve

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit kapila 2013-01-19 05:52:41 Re: Strange Windows problem, lock_timeout test request
Previous Message Jaime Casanova 2013-01-19 05:38:30 Re: [PATCH]Tablesample Submission