pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thara Vadakkeveedu <tharagv@yahoo.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: accidentally deleted data directory
Date: Sun, 22 Sep 2013 09:05:33 -0700 (PDT)
Message-ID: <1379865933.14475.YahooMailNeo@web125003.mail.ne1.yahoo.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Hi
I am new to postgresql. I have postgresql 9.2 installed on Red hat linux 6.4
I accidentally deleted data directory this morning (/var/lib/postgresql/9.2/data)
 
I tried to start posgresql 9.2 service
service postgresql9.2 start
 
I got a amessage to initialize the db first.
 
so I ran service postgresql-9.2 initdb
 
this was successful
then i tried service postgresql-9.2 start
this failed.
 
pgstartup.log indicated I can start the database server using:
    /usr/pgsql-9.2/bin/postgres -D /var/lib/pgsql/9.2/data
or
    /usr/pgsql-9.2/bin/pg_ctl -D /var/lib/pgsql/9.2/data -l logfile start

However I  am unable to start database as root
 
That is the only account I use on this server. 
I tried  su - postgres
and then from the bash shell i tried to run these commands (tried one at a time)
but it said address in use
there are no processes running on 5432.
 
How can I start postgres service?
 
Thanks
Thara.

view thread (10+ messages)  latest in thread

Message-ID: <1379865933.14475.YahooMailNeo@web125003.mail.ne1.yahoo.com>
Permalink:  ../1379865933.14475.YahooMailNeo@web125003.mail.ne1.yahoo.com/
Also on:    postgresql.org/message-id/1379865933.14475.YahooMailNeo@web125003.mail.ne1.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tharagv@yahoo.com
  Subject: Re: accidentally deleted data directory
  In-Reply-To: <1379865933.14475.YahooMailNeo@web125003.mail.ne1.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox