PDA

View Full Version : Yet another can't start PostgreSQL thread



Dustangel
09-30-2009, 10:20 AM
Hello everyone.

I went to reinstall my WinXP this morning and since I have a 82Gb database I figured I might skip the dump/restore part and instead just keep the database intact on the disk and reinstall PostgreSQL to the same place as stated here: http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=177.

It didn't work, instead I got the message "The PostgreSQL Database Server 8.3 service on Local Computer started then stopped." I did some research on the forums and tried http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=34, http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=171 and http://www.holdemmanager.net/forum/showthread.php?t=8261. Neither fixed the problem. However, when following steps detailed in http://www.holdemmanager.net/forum/showthread.php?t=8261, I could get HoldemManager to connect in step 5, but it failed to connect in step 9. S.O.L.

I have also tried wiping Windows clean again, installing only the video and motherboard drivers and service pack 2, and installing postgre immediately after, but it still didn't work when I installed it over the existing database.

So, is there anything else I can do to get PostgreSQL working or at least get my data back? Like, is there a way to dump or import a database which isn't connected?

netsrak
09-30-2009, 10:42 AM
You could try to delete the file postmaster.pid in the postgresql data folder and see if postgresql starts then.

If not i have no other idea.

Dustangel
09-30-2009, 10:43 AM
There was no such file.

netsrak
09-30-2009, 01:26 PM
You could try to mail fabio@holdemmanager.net with a link to this thread. Maybe he has another idea.

Dustangel
09-30-2009, 01:53 PM
Thanks, I will.

Dustangel
10-01-2009, 03:33 AM
With help from Fabio, I've managed to solve this.

When I looked up the logs in Control Panel -> Administrative Tools -> Event Viewer -> Windows Logs -> Application, it said "postgres cannot access the server configuration file "E:/PostgreSQL/8.3/data/postgresql.conf": No such file or directory". What this actually means is that user 'postgres' doesn't have system rights to access this file. So the fix is to grant the correct rights.

The exact process varies slightly in Windows XP Pro and Windows XP Home Edition, and I am no system administrator, so please forgive and correct me where I am not precise enough.

First you should turn off Simple File Sharing. Then right-click on the folder data, select Properties and go to Security tab. Hit Advanced and go to Owner tab and change owner to your current account. If you cannot do that, you'll have to log on using administrative account. Then go to Permissions tab, click the Inherit... checkbox at the bottom of the page, and click Apply. This will copy all regular permissions just in case you need them.

Now you need to add special permissions for user 'postgres'. I actually did this by making a clean installation of PostgreSQL, looking up what permissions it granted for it's own data folder, and copying them exactly. Hit Add..., type 'postgres', hit Check Names, then OK. Then hit Edit..., mark the necessary permissions and click OK.

Finally, click the Replace... checkbox at the bottom of the page and hit Apply. This is it, now you can start the service if you already have PostgreSQL installed, or install it if not.