Thread: pg_version is missing
I had a problem with a database yesterday on a Windows server. The service was described as executing "C:\Program Files\PostgreSQL\8.3\bin\pg_ctl.exe" runservice -w -N "pgsql-8.3" -D "E:\PostgreSQL\data\". I also had an old backup of the data directory from 8.2. It was located on E:\PostgreSQL\data_old\. I didn't really need to keep the old 8.2 data directory but I did. To upgrade from 8.2 to 8.3, I had performed an export, un-install 8.2, install 8.3, and then import. So during some cleanup yesterday, I removed the data_old directory and my database crashed. It complained that it couldn't find pg_version. I also tried initdb but it wouldn't work. It gave me an error of "the program 'postgres' is needed by initdb but was not found". Any idea on how my new install of 8.3 somehow got linked to the data_old directory? I'm not asking how to fix the problem because I had a good backup and I was able to restore. I'm trying to understand why and how it happened so I can prevent it in the future. Maybe this is a Windows problem? We are moving to Solaris by the end of May which I'm really excited about. PostgreSQL flys on 64 bit Solaris. Jon Author of fn_ugly() :)
was there an explicit definition of $PGDATA variable pointing to the data_old location?
rgds,
dotyet
rgds,
dotyet
On Fri, Apr 25, 2008 at 8:47 AM, Roberts, Jon <Jon.Roberts@asurion.com> wrote:
I had a problem with a database yesterday on a Windows server. The
service was described as executing "C:\Program
Files\PostgreSQL\8.3\bin\pg_ctl.exe" runservice -w -N "pgsql-8.3" -D
"E:\PostgreSQL\data\". I also had an old backup of the data directory
from 8.2. It was located on E:\PostgreSQL\data_old\.
I didn't really need to keep the old 8.2 data directory but I did. To
upgrade from 8.2 to 8.3, I had performed an export, un-install 8.2,
install 8.3, and then import.
So during some cleanup yesterday, I removed the data_old directory and
my database crashed. It complained that it couldn't find pg_version. I
also tried initdb but it wouldn't work. It gave me an error of "the
program 'postgres' is needed by initdb but was not found".
Any idea on how my new install of 8.3 somehow got linked to the data_old
directory? I'm not asking how to fix the problem because I had a good
backup and I was able to restore. I'm trying to understand why and how
it happened so I can prevent it in the future.
Maybe this is a Windows problem? We are moving to Solaris by the end of
May which I'm really excited about. PostgreSQL flys on 64 bit Solaris.
Jon
Author of fn_ugly() :)
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general