The 9.6 binaries should be installed in their own
directories, so no need to move anything around.
On 9/27/19 9:23 AM, Ekaterina Amez
wrote:
Hi
again,
I previously asked in another list about what version would be the
best to make a pg_upgrade from v8.4. I've finally chosen 9.6 to
make version jump less drastic, though I've been testing
pg_upgrade whole process with both 9.6 and 10. But after
reinstalling my test machine several times now I have 9.6 so
that's what I'll be talking about.
The problem I have is that when I install PG9.6 in a machine with
CentOS and PG8.4 (version that comes with OS) then v8.4 becomes
unavailable. Finally I've found that psql binary changes after
v9.6 installation. But checking files that are installed with this
version, I can't see what package causes the problem. And as I'm
not used to *nix systems, I'm not sure how can I solve this. The
process I've done:
- Installed a new machine with CentOS installation CD, which
installs CentOS and PG8.4
- Made InitDB, started service (with "service postgresql start"
instruction).
- Without changing pg_hba.conf (nor postgresql.conf) file, I've
connected with psql, created some roles and some empty databases.
Disconnected from database ("\q") and restored some backups with
psql command.
- After all this, I can connect to v8.4 with root user and
postgres user. Finally I've stopped postgresql (service stop).
- Tried to start postgres again but using pg_ctl. Tested
connection with psql again (ok) and stopped.
- v8.4 is installed in /usr/bin and /var/lib/pgsql folders, that
seemed quite generic for me, so I made a copy of both (with "cp
-pr" command):
/usr/bin ==> /usr/bin_8.4
/var/lib/pgsl ==> /var/lib/pgsl_8.4
- I've tested copy: started with pg_ctl (the one that was copied
to /usr/bin_8.4) pointing to copied data folder
(/var/lib/pgsl_8.4/data). Started ok. Tried to connect with psql
(ok) and stopped again.
- At this point, I've followed
https://www.postgresql.org/download/linux/rdhat/ instructions to
install v9.6: download repo, install client and install server.
- Made InitDB in v9.6 and changed listening port in
postgresql.conf (v9.6 config file)
- After this installation, if I make "service postgresql start" I
can see "something" running (I can list processes with ps -ef) but
when trying to connect with psql it won't connect exiting with a
message like (sorry, it's my translation as original message is
not in english):
psql: could not connect to server: file or directory does not
exist.
Is server locally running and listening at Unix domain socket
«/var/run/postgresql/.s.PGSQL.5432»?
Also "/usr/bin/psql" file is different than it's copy at bin_8.4
(some Kbytes bigger than the original file).
Older PG version is now unavailable, and I can't run pg_upgrade to
migrate to a newer version. I've managed to make the whole process
in Ubuntu 18, but Production server is CentOS 6.8. Any clue about
why is this happening and how can I deal with this situation?
During CentOS installation I can't (or haven't seen) change
installation directory for Postgres. I now about data_directory in
postgresql.conf, but not sure how to manage binaries dir.
I have recorded all the commands I've run, just in case anyone
need more detailed info.
Thanks in advance,
Ekaterina
--
Angular momentum makes the world go 'round.
|