PDA

View Full Version : Cannot start Postgres after moving DB



Bonneville
01-26-2011, 03:31 AM
So, I moved my DB following the steps:
here (http://faq.holdemmanager.com/questions/368/Move+Database+to+Another+Hard+Drive+or+Partition)

I also assigned permissions as described:
here (http://forums.holdemmanager.com/manager-general/37957-postgres-data-folder-location.html)

I am getting the 127.0.0.1 error and cannot get postgres to start. I have tried to fix it as described here (http://forums.holdemmanager.com/manager-general/8182-fix-postgresql-cannot-start-error-127-0-0-1-a.html). The file included 127.0.0.1 [localhost] as desired. However, there was a # at the beginning of the line. I cannot save changes to this file, even as Admin.

What am I missing? I have Win7, latest HEM release on Postgres 8.4.

Patvs
01-26-2011, 10:40 AM
This is usually a firewall or windows update issue.

First try to reboot.

If no help, try this:

Start > Programs > PostgreSQL > 8.x > Stop Service

Start > Programs > PostgreSQL > 8.x > Start Service

If that doesnt help delete the \postgresql\8.x\data\postmaster.pid file, if you see it. And reboot.


If that doesn't help you will have to reinstall PostgreSQL completely

When you reinstall SQL, if it still auto-detects your old folder (and only wants to install to the OLD location) there still are references to the old location in your system registry.

Bonneville
01-27-2011, 12:16 AM
Reboot did not work.

Tried to stop and start from Start/Programs/Postgres menu... both returned an error <2> message.

I do not have a postmaster.pid file in that directory. There IS a postmaster.opts file.

I did an uninstall and re-install. Same symptoms (with a duplicate postgres directory). I did a system restore to back-up to pre-installation and reinstalled again. The duplicate postgres directory is gone, but still the same problem not being able to start the service.

Patvs
01-27-2011, 06:26 AM
Is your secondary login running? The secondary logon service is a standard windows service which is available on every windows computer. In the latest versions it is not started automatically. You need to start it via control panel > administrative tools > services. Starting it once should insure it works in the future also.


Download 8.4.6, 9.0.2 and 8.2 from PostgreSQL: The world's most advanced open source database (http://www.postgresql.org)

click on Start and go to Programs -> Accessories -> Command Prompt

* If you are on Vista, rightclick and choose "Run as Administrator".


A black box should appear. Type 'net user postgres /del' (without the quotes) and press enter.

The user is now deleted and you can (re)install PostgreSQL.



Then install 8.4.6 to port 5432, try 9.0.2 to port 5433 and 8.2 to port 5434
8.2 should ALWAYS work.

8.4/9.0 not running: add postgres.exe and pg_ctl.exe to the exceptions list of the firewall.