Re: re-install postgres/postGIS without Loosing data??

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: "G(dot) P(dot)" <pagomen2001(at)yahoo(dot)gr>
Cc: salah jubeh <s_jubeh(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: re-install postgres/postGIS without Loosing data??
Date: 2011-05-18 00:52:07
Message-ID: 4DD31837.7060900@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 18/05/2011 7:13 AM, G. P. wrote:

> C:\Program Files\PostgreSQL\9.0\bin>pg_ctl.exe -U postgres restart
> pg_ctl: PID file "C:/Program Files/PostgreSQL/9.0/data/postmaster.pid"

> */2011-05-18 02:09:26 EEST LOG: database system was shut down at
> 2011-05-17 22:45:00 EEST/*
> */2011-05-18 02:09:36 EEST LOG: could not remove cache file
> "base/32803/pg_internal.init": Permission denied/*
> */2011-05-18 02:09:36 EEST PANIC: could not open file
> "pg_xlog/000000010000000000000002" (log file 0, segment 2): Permission
> denied/*

You cannot restart postgresql using pg_ctl running under your normal
user account if it was originally set up as a Windows service running as
the "postgres" user. You must use runas.exe to run pg_ctl as user
"postgres", or just use the service control panel (services.msc) or "net
service" command to control it.

Rather than trying to reinstall, which might make the problem worse
rather than better, stop trying to change things and think for a moment.
Restart the computer, then check the services control panel and see if
postgresql is shown as running there. If it is not, try to start it. If
it does not start, examine the system event logs ("Event Viewer" in the
start menu) to see if there are any error messages from the service.
Also check the PostgreSQL logs, which will be in

C:/Program Files/PostgreSQL/9.0/data/pg_log

to see if there are any informative error messages at the bottom of the
most recent log file.

Once you've done that, you'll have some idea what's wrong and what to do
next.

--
Craig Ringer

Tech-related writing at http://soapyfrogs.blogspot.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tatsuo Ishii 2011-05-18 05:59:09 Re: Memcached for Database server
Previous Message Craig Ringer 2011-05-18 00:47:58 Re: Infinity dates in RoR was How to handle bogus nulls from ActiveRecord