Re: accidentally deleted data directory - Mailing list pgsql-admin
From | Thara Vadakkeveedu |
---|---|
Subject | Re: accidentally deleted data directory |
Date | |
Msg-id | 1380030784.27416.YahooMailNeo@web125003.mail.ne1.yahoo.com Whole thread Raw |
In response to | Re: accidentally deleted data directory (Thara Vadakkeveedu <tharagv@yahoo.com>) |
Responses |
Re: accidentally deleted data directory
|
List | 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
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
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_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
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
pgsql-admin by date: