We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Postgresql 8.4 on Ubuntu - PG_VERSION is missing

R7AF
R7AF asked
on
Medium Priority
3,591 Views
Last Modified: 2012-05-11
I want to get PostgreSQL 8.4 running on Ubuntu 10.10 (64bit desktop). I've installed postgres via Synaptic, tried to get it configured, but I can't get it working.

When I run this command:

./pg_ctl start -D /usr/share/postgresql/8.4/DATA

I get this error message:

FATAL: "/usr/share/postgresql/8.4/DATA" is not a valid data directory
DETAIL: File "/usr/share/postgresql/8.4/DATA/PG_VERSION" is missing.

The directory /usr/share/postgresql/8.4/DATA exists with owner postgres, but there is no PG_VERSION file in it.

How can I get Postgres working?
Comment
Watch Question

CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Top Expert 2007

Author

Commented:
Thanks. I can run it in the terminal now, but after a restart it doesn't run.

In /etc/rc2.d I see the following two symlinks. I thought this would make postgresql run at startup. Do I need to do something else?

lrwxrwxrwx   1 root root    20 2010-10-14 12:59 S19postgresql -> ../init.d/postgresql
lrwxrwxrwx   1 root root    24 2010-05-25 16:42 S19postgresql-8.4 -> ../init.d/postgresql-8.4
CERTIFIED EXPERT

Commented:
# as root
chkconfig postgresql on

# will set service postgresql to start automatically on reboot

# the command
service postgresql start
# will manually start the postgresql service
Top Expert 2007

Author

Commented:
I installed chkconfig and ran the command. After a restart, postgres didn't run. When I use the command "service postgresql start", nothing happens, not even a comment or error message.

Postgresql does start when I use the following command.

/usr/lib/postgresql/8.4/bin/postgres -D /usr/share/postgresql/8.4/DATA
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.