By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,982 Members | 1,955 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,982 IT Pros & Developers. It's quick & easy.

Problem with Windows PostgreSQL 8.1 service

P: 3
I have Windows XP SP2 with PostgreSQL version 8.1.0 installed.

This has worked fine for me for many months.

When I restarted the computer to day, the PostgreSQL service had disapperared.

I went back to a restore point for the machine and once more the PostgreSQL service came up ine the list of services, but it was not started at reboot.

When I try to start the service manually it closes down immediately and I get a cryptic message from Windows that some services automatically closes down when they are not busy doing something.

I have worked with a database shema for more than a week and now I have lost my work if I cannot restart the service - PLEASE HELP - someone

Regards

Trond
Apr 3 '07 #1
Share this Question
Share on Google+
7 Replies


Expert 100+
P: 534
Welcome to the Forum!

Did you look at the database log for any relevant messages?

And check out this link, see if you have the same problem...
Apr 3 '07 #2

P: 3
I checked out the link you gave me.

I have installed Postgres correctly, infact I have installed 8.1 on several PC's and have not experienced the problem on any of these.

I have tried to look around using Google and have seen the tip about deleting the postmaster pid file - it did not work for me.

Regards

Trond
Apr 4 '07 #3

Expert 100+
P: 534
Thanks for the update.
Did you have a chance to look at the database log file?
Are there any relevant messages in the Windows Event Log?
Apr 4 '07 #4

P: 3
Hi,
I could not get anything from the log files. Maybe an expert can. But I have figured out something else.

I have had this problem on two of my PC's and on both these machine I have runned a program called RegClean that the producer says is very good for cleaning the registry.

When I looked into the "log-file" (a reg file) that RegClean produced there is a reference to the start-up service of PostgreSQL - and after rebooting the machine - PostGreSQL service was gone on both machines.

I suspect RegClean is the reason and I will be very reluctant to use this product in the future.

I send an email to RegClean support service and got an "answer" that did me no good.

Luckily it was test machines and now I have used some hours to reconstruct the shema of the database I am working with.

Problem solved - in a way ...

Regards

Trond
Apr 10 '07 #5

Expert 100+
P: 534
I actually thought that you could've lost the service auto-startup option, but I wasn't quite sure whether this alone could cause problems because you noted

>> When I try to start the service manually it closes down immediately.

In any case, thank you very much for update, this may help other folks in the future.

P.S. I also had a bitter experience with some registry cleaners, and I grew very skeptical about them; I never let them do anything without first looking carefully at what they flagged as errors.
Apr 10 '07 #6

P: 37
I have Windows XP SP2 with PostgreSQL version 8.1.0 installed.

This has worked fine for me for many months.

When I restarted the computer to day, the PostgreSQL service had disapperared.

I went back to a restore point for the machine and once more the PostgreSQL service came up ine the list of services, but it was not started at reboot.

When I try to start the service manually it closes down immediately and I get a cryptic message from Windows that some services automatically closes down when they are not busy doing something.

I have worked with a database shema for more than a week and now I have lost my work if I cannot restart the service - PLEASE HELP - someone

Regards

Trond
if the only problem is your postgres service then u can create your new postgres service. use pg_ctl

C:> pg_ctl register -N service_name -U os_user -P os_user_password -D data_directory

ex:
C:> pg_ctl register -N my_pg8.0 -U pgUser -P pgPasswd -D "D:\Data\pg8.0"
Apr 13 '07 #7

P: 1
Thank you, Trond. Your comment turned out to be very useful for me. After reimaging my laptop I had terrible time installing PostgreSQL 8.4. When I tried installing from scratch, the data dir always was empty regardless what I did and (I do have Administrator privileges on this machine). When I tried to copy data dir from my backup, it did not create the windows service.
Cleaning and rebooting did not help.

Finally, I cleaned postgresql related entries from the registry, change security settings to "Full Control" on C:\Program Files\PostgreSql and all its subfolders (8.4\data), ran one-click installer postgresql-8.4.6-1-windows.exe. The installation process did not complain, the registry entries for PostgreSQL were created by the service was not, so I had to create service manually as Trond suggested earlier:

C:\Program Files\PostgreSQL\8.4\bin>pg_ctl register -N postgresql-8.4 -U postgres -P<my_password> -D "C:\Program Files\PostgreSQL\8.4\data"
and it worked!
Dec 18 '10 #8

Post your reply

Sign in to post your reply or Sign up for a free account.