Stumped by a version conflict. - Mailing list pgsql-admin

From Patric Michael
Subject Stumped by a version conflict.
Date
Msg-id AANLkTimvYZbjG_g_TnSItb7vxzHxolXFMrB5cHmOmIfC@mail.gmail.com
Whole thread Raw
Responses Re: Stumped by a version conflict.  (Craig James <craig_james@emolecules.com>)
Re: Stumped by a version conflict.  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-admin
Hi all...

I joined this list in an effort to solve a puzzle I fail to understand.  Thank you in advance for taking the time to read.

I've been managing a domain for the last eight years as an erstwhile administrator.  Erstwhile meaning it is largely a matter of setting up and automating the routine functions of the machine. I am not by any stretch of the imagination a guru. And please keep in mind that aside from minor tweaks and upgrades, I pretty much leave the machine alone.

In that time, I've upgraded postgres 7.1 to 7.4 and now to 8.1 and have rarely needed to reboot the machine. (Yay CentOS!)  Manual installs from source.  Not RPM's

A few days ago however, the co-lo appears to have taken the system down for a short time and brought it back up, essentially rebooting the system.  No big deal, except that until then, it had been running for almost two years.

Everything came back up as expected, with the exception of postgres.  When I went to start it manually, I got an error warning of an unrecognized tcpip_socket parameter in postgresql.conf.  Searching the 8.1 manual I discovered it had been deprecated in favor of listen_addresses.  Odd, but okay.

I commented out the parameter (irrelevant since psql was configured with defaults anyway) and tried starting it again.  The next error I got was that the database was initialized with version 7.4 and this version was 8.1.  What?

I checked the time stamps of the database I knew to be active, and yes, there are several timestamps from two days ago so I kow that's the most recent.  PG_VERSION does indeed show 7.4 as the current version, and yet, the binaries return 8.1.11 as the current version.

It should be noted at this point that medical problems have affected my memory, so I may well be forgetting something obvious to the rest of you.   :)

So my questions are these:  Since 8.1 binaries are the only ones that exist on the machine, (in /usr/bin) how is it possible that they could have utilized a database initialized with 7.4 in the first place?  I thought perhaps I started the server back then with an old binary, rather than what's in the path, but I find no other instances of psql, pg_ctl, etc. except whats in /bin/.

Without an answer to that, and since I can't start the server as it is (apparently) currently compiled, I'd have to recompile 7.4, open the database, dumpall with those binaries, initialize a new database with the 8.1 binaries, and restore the backed up db into the 8.1 structure.  But if the old 7.4 (current) db was running under 8.1 (and I still cant see how that was possible) will it damage the db structure when it is restored? 

Maybe the better question, though probably harder to answer is, "What am I forgetting?"

Any thoughts or suggestions on how to restart postgres with the database I know to be current will be especially helpful. 

Thank you.


pgsql-admin by date:

Previous
From: "ENGEMANN, DAYSE"
Date:
Subject: Re: How to move a database from HP server to Linux Server that had already one database.
Next
From: Craig James
Date:
Subject: Re: Stumped by a version conflict.