pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
accidentally deleted data directory
10+ messages / 3 participants
[nested] [flat]

* accidentally deleted data directory
@ 2013-09-22 16:05  Thara Vadakkeveedu <tharagv@yahoo.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Thara Vadakkeveedu @ 2013-09-22 16:05 UTC (permalink / raw)
  To: pgsql-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.

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: accidentally deleted data directory
@ 2013-09-23 10:48  Albe Laurenz <laurenz.albe@wien.gv.at>
  parent: Thara Vadakkeveedu <tharagv@yahoo.com>
  0 siblings, 0 replies; 10+ messages in thread

From: Albe Laurenz @ 2013-09-23 10:48 UTC (permalink / raw)
  To: Thara Vadakkeveedu <tharagv@yahoo.com>; pgsql-admin

Thara Vadakkeveedu wrote:
> 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?

See if there are processes running for user "postgres" that look
like database processes and kill them.

Then try again.

What exactly is the error message?

Yours,
Laurenz Albe

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* accidentally deleted data directory
@ 2013-09-23 22:36  Thara Vadakkeveedu <tharagv@yahoo.com>
  0 siblings, 2 replies; 10+ messages in thread

From: Thara Vadakkeveedu @ 2013-09-23 22:36 UTC (permalink / raw)
  To: pgsql-admin

 
See if there are processes running for user "postgres" that look
like database processes and kill them.
 
Then try again.
 
What exactly is the error message?
 
Yours,
Laurenz Albe
 
 
Hi
 
 
ps –edf shows no postgres processes:
-bash-4.1$ ps -edf | grep postgres
root      6412  6249  0 18:22 pts/0    00:00:00 su - postgres
postgres  6413  6412  0 18:22 pts/0    00:00:00 -bash
postgres  6465  6413  1 18:27 pts/0    00:00:00 ps -edf
postgres  6466  6413  0 18:27 pts/0    00:00:00 grep postgres
 
 
Ran the following command as postgres user
-bash-4.1$ /usr/pgsql-9.2/bin/postgres -D /var/lib/pgsql/9.2/data
-bash-4.1$
 
pgstartup.log is empty
 
-bash-4.1$ pwd
/var/lib/pgsql/9.2
-bash-4.1$ ls
backups  data  logfile  pgstartup.log
-bash-4.1$ ls -al
total 20
drwx------.  4 postgres postgres 4096 Sep 23 18:21 .
drwx------.  3 postgres postgres 4096 Sep 23 18:18 ..
drwx------.  2 postgres postgres 4096 Apr  1 19:41 backups
drwx------. 15 postgres postgres 4096 Sep 23 18:28 data
-rw-------.  1 postgres postgres  409 Sep 22 11:44 logfile
-rw-------   1 postgres postgres    0 Sep 23 18:20 pgstartup.log
-bash-4.1$
 
Is there something else I can try?
 
I don’t have any data to restore. This is an installation which is only a couple of weeks old. I can uninstall and reinstall if that is easier.
 
 
Where can I find the uninstaller ?
Thanks
Thara.

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: accidentally deleted data directory
@ 2013-09-24 00:40  Cliff Pratt <enkiduonthenet@gmail.com>
  parent: Thara Vadakkeveedu <tharagv@yahoo.com>
  1 sibling, 0 replies; 10+ messages in thread

From: Cliff Pratt @ 2013-09-24 00:40 UTC (permalink / raw)
  To: Thara Vadakkeveedu <tharagv@yahoo.com>; +Cc: pgsql-admin

If pgstartup.log is empty that points at an issue with the configuration
file. From memory, when you do an initdb it recreates the configuration
files in the /var/lib/pg... directory. I would look at the main control
file and the pg_hba.conf and try to start the database passing it the name
of the main conf file as a parameter (as well as the database directory).

Cheers,

Cliff


On Tue, Sep 24, 2013 at 10:36 AM, Thara Vadakkeveedu <tharagv@yahoo.com>wrote:

>
>     See if there are processes running for user "postgres" that look
> like database processes and kill them.
>
> Then try again.
>
> What exactly is the error message?
>
> Yours,
> Laurenz Albe
>
>
> Hi
>
>
> ps –edf shows no postgres processes:
> -bash-4.1$ ps -edf | grep postgres
> root      6412  6249  0 18:22 pts/0    00:00:00 su - postgres
> postgres  6413  6412  0 18:22 pts/0    00:00:00 -bash
> postgres  6465  6413  1 18:27 pts/0    00:00:00 ps -edf
> postgres  6466  6413  0 18:27 pts/0    00:00:00 grep postgres
>
>
> Ran the following command as postgres user
> -bash-4.1$ /usr/pgsql-9.2/bin/postgres -D /var/lib/pgsql/9.2/data
> -bash-4.1$
>
> pgstartup.log is empty
>
> -bash-4.1$ pwd
> /var/lib/pgsql/9.2
> -bash-4.1$ ls
> backups  data  logfile  pgstartup.log
> -bash-4.1$ ls -al
> total 20
> drwx------.  4 postgres postgres 4096 Sep 23 18:21 .
> drwx------.  3 postgres postgres 4096 Sep 23 18:18 ..
> drwx------.  2 postgres postgres 4096 Apr  1 19:41 backups
> drwx------. 15 postgres postgres 4096 Sep 23 18:28 data
> -rw-------.  1 postgres postgres  409 Sep 22 11:44 logfile
> -rw-------   1 postgres postgres    0 Sep 23 18:20 pgstartup.log
> -bash-4.1$
>
> Is there something else I can try?
>
> I don’t have any data to restore. This is an installation which is only a
> couple of weeks old. I can uninstall and reinstall if that is easier.
>
>
> Where can I find the uninstaller ?
> Thanks
> Thara.
>
>
>
>
>
>
>

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: accidentally deleted data directory
@ 2013-09-24 10:41  Albe Laurenz <laurenz.albe@wien.gv.at>
  parent: Thara Vadakkeveedu <tharagv@yahoo.com>
  1 sibling, 1 reply; 10+ messages in thread

From: Albe Laurenz @ 2013-09-24 10:41 UTC (permalink / raw)
  To: Thara Vadakkeveedu <tharagv@yahoo.com>; pgsql-admin

Thara Vadakkeveedu wrote:
> ps –edf shows no postgres processes:
> -bash-4.1$ ps -edf | grep postgres
> root      6412  6249  0 18:22 pts/0    00:00:00 su - postgres
> postgres  6413  6412  0 18:22 pts/0    00:00:00 -bash
> postgres  6465  6413  1 18:27 pts/0    00:00:00 ps -edf
> postgres  6466  6413  0 18:27 pts/0    00:00:00 grep postgres

Ok.

> Ran the following command as postgres user
> -bash-4.1$ /usr/pgsql-9.2/bin/postgres -D /var/lib/pgsql/9.2/data
> 
> pgstartup.log is empty
> 
> -bash-4.1$ pwd
> /var/lib/pgsql/9.2
> -bash-4.1$ ls
> backups  data  logfile  pgstartup.log
> -bash-4.1$ ls -al
> total 20
> drwx------.  4 postgres postgres 4096 Sep 23 18:21 .
> drwx------.  3 postgres postgres 4096 Sep 23 18:18 ..
> drwx------.  2 postgres postgres 4096 Apr  1 19:41 backups
> drwx------. 15 postgres postgres 4096 Sep 23 18:28 data
> -rw-------.  1 postgres postgres  409 Sep 22 11:44 logfile
> -rw-------   1 postgres postgres    0 Sep 23 18:20 pgstartup.log
> -bash-4.1$
> 
> Is there something else I can try?

Yes.

Look how logging is configured in /var/lib/pgsql/9.2/data/postgresql.conf
(parameters log_destination, logging_collector, log_directory, log_filename).

Find the log file and see what is in there.

> I don’t have any data to restore. This is an installation which is only a couple of weeks old. I can
> uninstall and reinstall if that is easier.

I don't know if that would solve the problem.

> Where can I find the uninstaller ?

How did you install PostgreSQL?

Yours,
Laurenz Albe

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: accidentally deleted data directory
@ 2013-09-24 13:47  Thara Vadakkeveedu <tharagv@yahoo.com>
  parent: Albe Laurenz <laurenz.albe@wien.gv.at>
  0 siblings, 1 reply; 10+ messages in thread

From: Thara Vadakkeveedu @ 2013-09-24 13:47 UTC (permalink / raw)
  To: Albe Laurenz <laurenz.albe@wien.gv.at>; pgsql-admin

Here are the settings in the postgresql.conf file:
 
I remember turning on logging to troubleshoot a performance issue....
 
log_destination = 'stderr'             
logging_collector = on                
log_directory = 'pg_log'               
#log_filename = 'postgresql-%a.log'      
log_truncate_on_rotation=on
log_rotation_age = 1d                   
log_rotation_size = 0 
 
I installed postges from an rpm file (pgdg-redhat92-9.2-7.noarch.rpm) using yum install.
Thanks,
thara.

________________________________
From: Albe Laurenz <laurenz.albe@wien.gv.at>
To: Thara Vadakkeveedu <tharagv@yahoo.com>; "pgsql-admin@postgresql.org" <pgsql-admin@postgresql.org> 
Sent: Tuesday, September 24, 2013 6:41 AM
Subject: Re: [ADMIN] accidentally deleted data directory


Thara Vadakkeveedu wrote:
> ps –edf shows no postgres processes:
> -bash-4.1$ ps -edf | grep postgres
> root      6412  6249  0 18:22 pts/0    00:00:00 su - postgres
> postgres  6413  6412  0 18:22 pts/0    00:00:00 -bash
> postgres  6465  6413  1 18:27 pts/0    00:00:00 ps -edf
> postgres  6466  6413  0 18:27 pts/0    00:00:00 grep postgres

Ok.

> Ran the following command as postgres user
> -bash-4.1$ /usr/pgsql-9.2/bin/postgres -D /var/lib/pgsql/9.2/data
> 
> pgstartup.log is empty
> 
> -bash-4.1$ pwd
> /var/lib/pgsql/9.2
> -bash-4.1$ ls
> backups  data  logfile  pgstartup.log
> -bash-4.1$ ls -al
> total 20
> drwx------.  4 postgres postgres 4096 Sep 23 18:21 .
> drwx------.  3 postgres postgres 4096 Sep 23 18:18 ..
> drwx------.  2 postgres postgres 4096 Apr  1 19:41 backups
> drwx------. 15 postgres postgres 4096 Sep 23 18:28 data
> -rw-------.  1 postgres postgres  409 Sep 22 11:44 logfile
> -rw-------  1 postgres postgres    0 Sep 23 18:20 pgstartup.log
> -bash-4.1$
> 
> Is there something else I can try?

Yes.

Look how logging is configured in /var/lib/pgsql/9.2/data/postgresql.conf
(parameters log_destination, logging_collector, log_directory, log_filename).

Find the log file and see what is in there.

> I don’t have any data to restore. This is an installation which is only a couple of weeks old. I can
> uninstall and reinstall if that is easier.

I don't know if that would solve the problem.

> Where can I find the uninstaller ?

How did you install PostgreSQL?

Yours,
Laurenz Albe

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: accidentally deleted data directory
@ 2013-09-24 13:53  Thara Vadakkeveedu <tharagv@yahoo.com>
  parent: Thara Vadakkeveedu <tharagv@yahoo.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Thara Vadakkeveedu @ 2013-09-24 13:53 UTC (permalink / raw)
  To: Thara Vadakkeveedu <tharagv@yahoo.com>; Albe Laurenz <laurenz.albe@wien.gv.at>; pgsql-admin

This is what I find in pg_log/postgresql-Mon.log file (contents relate to my attempts to start postgres yesterday)
 
LOG:  database system was shut down at 2013-09-22 12:20:51 EDT
LOG:  invalid magic number 0000 in log file 0, segment 39, offset 0
LOG:  invalid primary checkpoint record
LOG:  invalid secondary checkpoint record
PANIC:  could not locate a valid checkpoint record
LOG:  startup process (PID 2361) was terminated by signal 6: Aborted
LOG:  aborting startup due to startup process failure
LOG:  database system was shut down at 2013-09-22 12:20:51 EDT
LOG:  invalid magic number 0000 in log file 0, segment 39, offset 0
LOG:  invalid primary checkpoint record
LOG:  invalid secondary checkpoint record
PANIC:  could not locate a valid checkpoint record
LOG:  startup process (PID 6323) was terminated by signal 6: Aborted
LOG:  aborting startup due to startup process failure
LOG:  database system was shut down at 2013-09-22 12:20:51 EDT
LOG:  invalid magic number 0000 in log file 0, segment 39, offset 0
LOG:  invalid primary checkpoint record
LOG:  invalid secondary checkpoint record
PANIC:  could not locate a valid checkpoint record
LOG:  startup process (PID 6346) was terminated by signal 6: Aborted
LOG:  aborting startup due to startup process failure
LOG:  database system was shut down at 2013-09-22 12:20:51 EDT
LOG:  invalid magic number 0000 in log file 0, segment 39, offset 0
"postgresql-Mon.log" 49L, 2709C
 
thanks
thara.


________________________________
From: Thara Vadakkeveedu <tharagv@yahoo.com>
To: Albe Laurenz <laurenz.albe@wien.gv.at>; "pgsql-admin@postgresql.org" <pgsql-admin@postgresql.org> 
Sent: Tuesday, September 24, 2013 9:47 AM
Subject: Re: [ADMIN] accidentally deleted data directory



Here are the settings in the postgresql.conf file:
 
I remember turning on logging to troubleshoot a performance issue....
 
log_destination = 'stderr'             
logging_collector = on                
log_directory = 'pg_log'               
#log_filename = 'postgresql-%a.log'      
log_truncate_on_rotation=on
log_rotation_age = 1d                   
log_rotation_size = 0 

I installed postges from an rpm file (pgdg-redhat92-9.2-7.noarch.rpm) using yum install.
Thanks,
thara.

________________________________
From: Albe Laurenz <laurenz.albe@wien.gv.at>
To: Thara Vadakkeveedu <tharagv@yahoo.com>; "pgsql-admin@postgresql.org" <pgsql-admin@postgresql.org> 
Sent: Tuesday, September 24, 2013 6:41 AM
Subject: Re: [ADMIN] accidentally deleted data directory


Thara Vadakkeveedu wrote:
> ps –edf shows no postgres processes:
> -bash-4.1$ ps -edf | grep postgres
> root      6412  6249  0 18:22 pts/0    00:00:00 su - postgres
> postgres  6413  6412  0 18:22 pts/0    00:00:00 -bash
> postgres  6465  6413  1 18:27 pts/0    00:00:00 ps -edf
> postgres  6466  6413  0 18:27 pts/0    00:00:00 grep postgres

Ok.

> Ran the following command as postgres user
> -bash-4.1$ /usr/pgsql-9.2/bin/postgres -D /var/lib/pgsql/9.2/data
> 
> pgstartup.log is empty
> 
> -bash-4.1$ pwd
> /var/lib/pgsql/9.2
> -bash-4.1$ ls
> backups  data  logfile  pgstartup.log
> -bash-4.1$ ls -al
> total 20
> drwx------.  4 postgres postgres 4096 Sep 23 18:21 .
> drwx------.  3 postgres postgres 4096 Sep 23 18:18 ..
> drwx------.  2 postgres postgres 4096 Apr  1 19:41 backups
> drwx------. 15 postgres postgres 4096 Sep 23 18:28 data
> -rw-------.  1 postgres postgres  409 Sep 22 11:44 logfile
> -rw-------  1 postgres postgres    0 Sep 23 18:20 pgstartup.log
> -bash-4.1$
> 
> Is there something else I can try?

Yes.

Look how logging is configured in /var/lib/pgsql/9.2/data/postgresql.conf
(parameters log_destination, logging_collector, log_directory, log_filename).

Find the log file and see what is in there.

> I don’t have any data to restore. This is an installation which is only a couple of weeks old. I can
> uninstall and reinstall if that is easier.

I don't know if that would solve the problem.

> Where can I find the uninstaller ?

How did you install PostgreSQL?

Yours,
Laurenz Albe

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: accidentally deleted data directory
@ 2013-09-24 14:09  Thara Vadakkeveedu <tharagv@yahoo.com>
  parent: Thara Vadakkeveedu <tharagv@yahoo.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Thara Vadakkeveedu @ 2013-09-24 14:09 UTC (permalink / raw)
  To: Thara Vadakkeveedu <tharagv@yahoo.com>; Albe Laurenz <laurenz.albe@wien.gv.at>; pgsql-admin



Do I need to run pg_resetxlog to fix the corrupted pg_control file issue? 
 
I can't find it in my 9.2 installation...
thanks
TG

________________________________
From: Thara Vadakkeveedu <tharagv@yahoo.com>
To: Thara Vadakkeveedu <tharagv@yahoo.com>; Albe Laurenz <laurenz.albe@wien.gv.at>; "pgsql-admin@postgresql.org" <pgsql-admin@postgresql.org> 
Sent: Tuesday, September 24, 2013 9:53 AM
Subject: Re: [ADMIN] accidentally deleted data directory



This is what I find in pg_log/postgresql-Mon.log file (contents relate to my attempts to start postgres yesterday)
 
LOG:  database system was shut down at 2013-09-22 12:20:51 EDT
LOG:  invalid magic number 0000 in log file 0, segment 39, offset 0
LOG:  invalid primary checkpoint record
LOG:  invalid secondary checkpoint record
PANIC:  could not locate a valid checkpoint record
LOG:  startup process (PID 2361) was terminated by signal 6: Aborted
LOG:  aborting startup due to startup process failure
LOG:  database system was shut down at 2013-09-22 12:20:51 EDT
LOG:  invalid magic number 0000 in log file 0, segment 39, offset 0
LOG:  invalid primary checkpoint record
LOG:  invalid secondary checkpoint record
PANIC:  could not locate a valid checkpoint record
LOG:  startup process (PID 6323) was terminated by signal 6: Aborted
LOG:  aborting startup due to startup process failure
LOG:  database system was shut down at 2013-09-22 12:20:51 EDT
LOG:  invalid magic number 0000 in log file 0, segment 39, offset 0
LOG:  invalid primary checkpoint record
LOG:  invalid secondary checkpoint record
PANIC:  could not locate a valid checkpoint record
LOG:  startup process (PID 6346) was terminated by signal 6: Aborted
LOG:  aborting startup due to startup process failure
LOG:  database system was shut down at 2013-09-22 12:20:51 EDT
LOG:  invalid magic number 0000 in log file 0, segment 39, offset 0
"postgresql-Mon.log" 49L, 2709C
 
thanks
thara.


________________________________
From: Thara Vadakkeveedu <tharagv@yahoo.com>
To: Albe Laurenz <laurenz.albe@wien.gv.at>; "pgsql-admin@postgresql.org" <pgsql-admin@postgresql.org> 
Sent: Tuesday, September 24, 2013 9:47 AM
Subject: Re: [ADMIN] accidentally deleted data directory



Here are the settings in the postgresql.conf file:
 
I remember turning on logging to troubleshoot a performance issue....
 
log_destination = 'stderr'             
logging_collector = on                
log_directory = 'pg_log'               
#log_filename = 'postgresql-%a.log'      
log_truncate_on_rotation=on
log_rotation_age = 1d                   
log_rotation_size = 0 

I installed postges from an rpm file (pgdg-redhat92-9.2-7.noarch.rpm) using yum install.
Thanks,
thara.

________________________________
From: Albe Laurenz <laurenz.albe@wien.gv.at>
To: Thara Vadakkeveedu <tharagv@yahoo.com>; "pgsql-admin@postgresql.org" <pgsql-admin@postgresql.org> 
Sent: Tuesday, September 24, 2013 6:41 AM
Subject: Re: [ADMIN] accidentally deleted data directory


Thara Vadakkeveedu wrote:
> ps –edf shows no postgres processes:
> -bash-4.1$ ps -edf | grep postgres
> root      6412  6249  0 18:22 pts/0    00:00:00 su - postgres
> postgres  6413  6412  0 18:22 pts/0    00:00:00 -bash
> postgres  6465  6413  1 18:27 pts/0    00:00:00 ps -edf
> postgres  6466  6413  0 18:27 pts/0    00:00:00 grep postgres

Ok.

> Ran the following command as postgres user
> -bash-4.1$ /usr/pgsql-9.2/bin/postgres -D /var/lib/pgsql/9.2/data
> 
> pgstartup.log is empty
> 
> -bash-4.1$ pwd
> /var/lib/pgsql/9.2
> -bash-4.1$ ls
> backups  data  logfile  pgstartup.log
> -bash-4.1$ ls -al
> total 20
> drwx------.  4 postgres postgres 4096 Sep 23 18:21 .
> drwx------.  3 postgres postgres 4096 Sep 23 18:18 ..
> drwx------.  2 postgres postgres 4096 Apr  1 19:41 backups
> drwx------. 15 postgres postgres 4096 Sep 23 18:28 data
> -rw-------.  1 postgres postgres  409 Sep 22 11:44 logfile
> -rw-------  1 postgres postgres    0 Sep 23 18:20 pgstartup.log
> -bash-4.1$
> 
> Is there something else I can try?

Yes.

Look how logging is configured in /var/lib/pgsql/9.2/data/postgresql.conf
(parameters log_destination, logging_collector, log_directory, log_filename).

Find the log file and see what is in there.

> I don’t have any data to restore. This is an installation which is only a couple of weeks old. I can
> uninstall and reinstall if that is easier.

I don't know if that would solve the problem.

> Where can I find the uninstaller ?

How did you install PostgreSQL?

Yours,
Laurenz Albe

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: accidentally deleted data directory
@ 2013-09-24 14:11  Albe Laurenz <laurenz.albe@wien.gv.at>
  parent: Thara Vadakkeveedu <tharagv@yahoo.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Albe Laurenz @ 2013-09-24 14:11 UTC (permalink / raw)
  To: Thara Vadakkeveedu <tharagv@yahoo.com>; pgsql-admin

Thara Vadakkeveedu wrote:
> Do I need to run pg_resetxlog to fix the corrupted pg_control file issue?

No, since you don't mind starting afresh,
just delete the data directory and run initdb.

Yours,
Laurenz Albe

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: accidentally deleted data directory
@ 2013-09-25 00:27  Thara Vadakkeveedu <tharagv@yahoo.com>
  parent: Albe Laurenz <laurenz.albe@wien.gv.at>
  0 siblings, 0 replies; 10+ messages in thread

From: Thara Vadakkeveedu @ 2013-09-25 00:27 UTC (permalink / raw)
  To: Albe Laurenz <laurenz.albe@wien.gv.at>; pgsql-admin

Thank you!
 
I deleted data directory again and then ran initdb.
This time service started successfully.
TG
 


________________________________
From: Albe Laurenz <laurenz.albe@wien.gv.at>
To: Thara Vadakkeveedu <tharagv@yahoo.com>; "pgsql-admin@postgresql.org" <pgsql-admin@postgresql.org> 
Sent: Tuesday, September 24, 2013 10:11 AM
Subject: Re: [ADMIN] accidentally deleted data directory


Thara Vadakkeveedu wrote:
> Do I need to run pg_resetxlog to fix the corrupted pg_control file issue?

No, since you don't mind starting afresh,
just delete the data directory and run initdb.

Yours,
Laurenz Albe

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

^ permalink  raw  reply  [nested|flat] 10+ messages in thread


end of thread, other threads:[~2013-09-25 00:27 UTC | newest]

Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-09-22 16:05 accidentally deleted data directory Thara Vadakkeveedu <tharagv@yahoo.com>
2013-09-23 10:48 ` Albe Laurenz <laurenz.albe@wien.gv.at>
2013-09-23 22:36 accidentally deleted data directory Thara Vadakkeveedu <tharagv@yahoo.com>
2013-09-24 00:40 ` Cliff Pratt <enkiduonthenet@gmail.com>
2013-09-24 10:41 ` Albe Laurenz <laurenz.albe@wien.gv.at>
2013-09-24 13:47   ` Thara Vadakkeveedu <tharagv@yahoo.com>
2013-09-24 13:53     ` Thara Vadakkeveedu <tharagv@yahoo.com>
2013-09-24 14:09       ` Thara Vadakkeveedu <tharagv@yahoo.com>
2013-09-24 14:11         ` Albe Laurenz <laurenz.albe@wien.gv.at>
2013-09-25 00:27           ` Thara Vadakkeveedu <tharagv@yahoo.com>

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