Re: Access Problem After Version Upgrade -- FIXED - Mailing list pgsql-general

From Doug McNaught
Subject Re: Access Problem After Version Upgrade -- FIXED
Date
Msg-id 87acdig7rw.fsf@asmodeus.mcnaught.org
Whole thread Raw
In response to Re: Access Problem After Version Upgrade -- FIXED  (Rich Shepard <rshepard@appl-ecosys.com>)
List pgsql-general
Rich Shepard <rshepard@appl-ecosys.com> writes:

> On Thu, 26 Jan 2006, Joshua D. Drake wrote:
>
>> Although I am glad you were able to get up and running, typically you don't
>> want to "move" libs like that. Instead update your /etc/ld.so.conf and run
>> ldconfig.
>
>    True, Josh. What I'd prefer to do is remove /usr/local/pgsql/ once I know
> that nothing there is being used any more with the 8.x versions of postgres.
> I thought of making softlinks, but those would fail as soon as the directory
> tree was removed.

FWIW, my practice when compiling PG from source (which I usually do)
is as follows:

* Configure each release with '--prefix=/usr/local/pgsql-8.1' (or
  whatever)

* Create (as far as disk space permits) independent data directories
  for each version--e.g. '/var/lib/pgsql-8.1/data'.

* Symlink whatever version I'm running to '/usr/local/pgsql'.  Have
  the standard PATH contain '/usr/local/pgsql/bin'.

This way, when I do an upgrade, I can test beforehand by setting PATH
and LD_LIBRARY_PATH (if applicable) appropriately, migrating my data,
running whatever programs I want to test, then switching the symlink.

It's worked fairly well, and it's nice to have the old binaries and
data directory sitting there to switch back to of something breaks
horribly.  The problem I've seen with RPM upgrades is that if
something breaks in the data upgrade process, the old binaries are
gone and it's a pain to get back to where you were.

Putting locally-compiled software in /usr/bin or /usr/lib is a bad
idea, generally, as you may confuse your package manager.

-Doug

pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Re: Access Problem After Version Upgrade -- FIXED
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] [PATCH] Better way to check for getaddrinfo