Re: Uninstall mess Postgresql 7.3.4, 8.1.4 on Redhat 9

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: MargaretGillon(at)chromalloy(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Uninstall mess Postgresql 7.3.4, 8.1.4 on Redhat 9
Date: 2007-09-19 17:12:26
Message-ID: 20070919171226.GM7780@crankycanuck.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Sep 19, 2007 at 08:52:29AM -0700, MargaretGillon(at)chromalloy(dot)com wrote:
>
> When the system boots there is a FAILED error when the server tries to
> load postgresql8.
>
> If I manually run
> /etc/rc.d/init.d/postgresql8 start
> the message is
> standard in must be tty
> [FAILED]

This suggsts your init script is broken. You ought to be able to
test whether postgres will run properly by setting PGDATA correctly,
and then running /path/to/pg8.x/bin/pg_ctl start. Whether postgres
will run is not exactly the same question as whether your init script
is correct.

> > How did you remake the account? Same UID?
> I don't know what the UID was. I used adduser to remake the postgres
> Redhat account.

But adduser likely changed the UID of the postgres account, and if
the old binaries or data directory were owned by a deleted user, then
the ownership is probably still held by that UID. (I can't be sure
how RH does this, but on every other UNIX I've ever used, useradd
foo; userdel foo; useradd foo causes the second "foo" user to have a
different UID than the first one.)

This would mean that the "new" postgres user still doesn't own the
data areas of the "old" postgres installation. You could discover
this by finding out the ownership of the data files (e.g., by using
ls -l).

> >Adding 8.2.x to your headaches won't make it better, for sure -- it's
> >just another layer of incompatibility.
>
> If versions can run in parallel why would installing the new version
> affect the 8.1.4 version?

It wouldn't, but your old data still need to be dumped and restored;
and without a running 8.1, that won't help you. Unless you mean that
you'd install 8.2.x and load from a backup. Even there, you might
have problems, because when doing an upgrade, you need to pg_dump
with the new pg_dump, not the old one.

A

--
Andrew Sullivan | ajs(at)crankycanuck(dot)ca
However important originality may be in some fields, restraint and
adherence to procedure emerge as the more significant virtues in a
great many others. --Alain de Botton

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Ribe 2007-09-19 17:19:08 Building Windows fat clients
Previous Message Erik Jones 2007-09-19 16:39:24 Re: For index bloat: VACUUM ANALYZE vs REINDEX/CLUSTER