Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VOT3E-00006T-Bc for pgsql-admin@arkaria.postgresql.org; Tue, 24 Sep 2013 13:53:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VOT3D-0004Gb-S5 for pgsql-admin@arkaria.postgresql.org; Tue, 24 Sep 2013 13:53:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VOT3C-0004GV-WE for pgsql-admin@postgresql.org; Tue, 24 Sep 2013 13:53:15 +0000 Received: from nm35-vm10.bullet.mail.gq1.yahoo.com ([98.136.216.155]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VOT36-0000Vp-62 for pgsql-admin@postgresql.org; Tue, 24 Sep 2013 13:53:13 +0000 Received: from [98.137.12.55] by nm35.bullet.mail.gq1.yahoo.com with NNFMP; 24 Sep 2013 13:53:05 -0000 Received: from [98.137.12.192] by tm15.bullet.mail.gq1.yahoo.com with NNFMP; 24 Sep 2013 13:53:05 -0000 Received: from [127.0.0.1] by omp1000.mail.gq1.yahoo.com with NNFMP; 24 Sep 2013 13:53:05 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 685868.7698.bm@omp1000.mail.gq1.yahoo.com Received: (qmail 27894 invoked by uid 60001); 24 Sep 2013 13:53:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1380030785; bh=So/QpWwrUDRWJ1DYdvmM7sX/sfA4bJAzoSJsmqAcy9E=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=SwAFpdVeB6qii8UDGGKHRXhuU7CgP13f9+6xDZ7s9vgDVWzsUBILnJC9n1mXrFn4u/GaXLg5ra6v0ZxEfm8+ce0VQxEUNUCM/n9zr8Rtx/eUsxBrnzkjWN6o26k+xIp6NY3c/FbD+OdHWt9HjerD25CyiVsqqo7QUkUs4dbrkkw= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=cL/KVKdhhM9PICNmpPdKK8hHP9sgFFphUcc7+7lNx3tvMM+/OWQGuuOqVrGdayk+FaL2HhrextQ48sKL8cfB8oX4RkOYoRj3QVFdKwyTPJi81EUrcaNsCoyGYEE9T9FVYrYKmmURNVj9QIJ9Ny4Vp5WYcjn0rRugN6UtyLCqvZM=; X-YMail-OSG: 2uB9u6YVM1m0ayY3U7a8x89bKESFSPpYypPPpALUHJyg7xs 1t6KIksObmPhRN58.0FMMXjorJfA3aYivNV_IpOUP93oLxP8icaFOi8UmxVO .FPvF66Ugou70OBUUmli9sBG5dyMpnNI.Usnn47D3Q4aGxtn6uBra2QpzF7C OrLZDw3rj4_WvkAFxVNwRbZz0eXWzPQ4j6T0pqwQzWORzz6ZDSG7yQH356pM jzr.5dP02c_g8rtcvtMJRAWwnMpeKCsVHJ7euVguXYQTbztLu7xPemfhMySn b6Gs2BZOu4ZNurMJ2jJ9OV9qUvA.K6_w2lWQHCFkBBqDLnyXJOVA2eTAS3NM Rp.FbOFYTzd6lnkFCcbZ10NuARStv1JiUATLTLby9rQzn.7jph_BpEz3v6Rc MlJv6EHbswQosQGzmKQ.XhQRWIYSsBTGKGL68jPpsFbVXv8tF4Qw6pr4apU7 bWEKRtX7n8Yt5_dNEjI_NqFM_OY7UwxP7.LQWb5xCf4h_7oihUYv9172M0vE RgehHW4jvKxbL6.lUmZO4D8UDHs1r42LR6tCjiKuRX3Nk6gXvdW.zo4kEtms M1fgmWK3kxf3JE8RGvfKaHmh11WpeMu8- Received: from [50.241.80.25] by web125003.mail.ne1.yahoo.com via HTTP; Tue, 24 Sep 2013 06:53:04 PDT X-Rocket-MIMEInfo: 002.001, VGhpcyBpcyB3aGF0IEkgZmluZCBpbiBwZ19sb2cvcG9zdGdyZXNxbC1Nb24ubG9nIGZpbGUgKGNvbnRlbnRzIHJlbGF0ZSB0b8KgbXkgYXR0ZW1wdHMgdG8gc3RhcnQgcG9zdGdyZXMgeWVzdGVyZGF5KQrCoApMT0c6wqAgZGF0YWJhc2Ugc3lzdGVtIHdhcyBzaHV0IGRvd24gYXQgMjAxMy0wOS0yMiAxMjoyMDo1MSBFRFQKTE9HOsKgIGludmFsaWQgbWFnaWMgbnVtYmVyIDAwMDAgaW4gbG9nIGZpbGUgMCwgc2VnbWVudCAzOSwgb2Zmc2V0IDAKTE9HOsKgIGludmFsaWQgcHJpbWFyeSBjaGVja3BvaW50IHJlY28BMAEBAQE- X-Mailer: YahooMailWebService/0.8.157.561 References: <48F1E182B1021B449414C85E713CE8250E61E0@WLT-MBX03.KRONOS.com> <1379975782.27726.YahooMailNeo@web125005.mail.ne1.yahoo.com> <1380030420.19939.YahooMailNeo@web125003.mail.ne1.yahoo.com> Message-ID: <1380030784.27416.YahooMailNeo@web125003.mail.ne1.yahoo.com> Date: Tue, 24 Sep 2013 06:53:04 -0700 (PDT) From: Thara Vadakkeveedu Reply-To: Thara Vadakkeveedu Subject: Re: accidentally deleted data directory To: Thara Vadakkeveedu , Albe Laurenz , "pgsql-admin@postgresql.org" In-Reply-To: <1380030420.19939.YahooMailNeo@web125003.mail.ne1.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-723168630-233646349-1380030784=:27416" X-Pg-Spam-Score: -4.3 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org ---723168630-233646349-1380030784=:27416 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable This is what I find in pg_log/postgresql-Mon.log file (contents relate to= =C2=A0my attempts to start postgres yesterday)=0A=C2=A0=0ALOG:=C2=A0 databa= se system was shut down at 2013-09-22 12:20:51 EDT=0ALOG:=C2=A0 invalid mag= ic number 0000 in log file 0, segment 39, offset 0=0ALOG:=C2=A0 invalid pri= mary checkpoint record=0ALOG:=C2=A0 invalid secondary checkpoint record=0AP= ANIC:=C2=A0 could not locate a valid checkpoint record=0ALOG:=C2=A0 startup= process (PID 2361) was terminated by signal 6: Aborted=0ALOG:=C2=A0 aborti= ng startup due to startup process failure=0ALOG:=C2=A0 database system was = shut down at 2013-09-22 12:20:51 EDT=0ALOG:=C2=A0 invalid magic number 0000= in log file 0, segment 39, offset 0=0ALOG:=C2=A0 invalid primary checkpoin= t record=0ALOG:=C2=A0 invalid secondary checkpoint record=0APANIC:=C2=A0 co= uld not locate a valid checkpoint record=0ALOG:=C2=A0 startup process (PID = 6323) was terminated by signal 6: Aborted=0ALOG:=C2=A0 aborting startup due= to startup process failure=0ALOG:=C2=A0 database system was shut down at 2= 013-09-22 12:20:51 EDT=0ALOG:=C2=A0 invalid magic number 0000 in log file 0= , segment 39, offset 0=0ALOG:=C2=A0 invalid primary checkpoint record=0ALOG= :=C2=A0 invalid secondary checkpoint record=0APANIC:=C2=A0 could not locate= a valid checkpoint record=0ALOG:=C2=A0 startup process (PID 6346) was term= inated by signal 6: Aborted=0ALOG:=C2=A0 aborting startup due to startup pr= ocess failure=0ALOG:=C2=A0 database system was shut down at 2013-09-22 12:2= 0:51 EDT=0ALOG:=C2=A0 invalid magic number 0000 in log file 0, segment 39, = offset 0=0A"postgresql-Mon.log" 49L, 2709C=0A=C2=A0=0Athanks=0Athara.=0A=0A= =0A________________________________=0AFrom: Thara Vadakkeveedu =0ATo: Albe Laurenz ; "pgsql-admin@postgres= ql.org" =0ASent: Tuesday, September 24, 2013 9= :47 AM=0ASubject: Re: [ADMIN] accidentally deleted data directory=0A=0A=0A= =0AHere are the settings in the postgresql.conf file:=0A=C2=A0=0AI remember= turning on logging to troubleshoot a performance issue....=0A=C2=A0=0Alog_= destination =3D 'stderr'=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=0Alogging_collector =3D on=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =0Alog_directory =3D 'pg_log'=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=0A#log_filename =3D 'postgres= ql-%a.log'=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =0Alog_truncate_on_rotation=3Don= =0Alog_rotation_age =3D 1d=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =0Alog_rotatio= n_size =3D 0 =0A=0AI installed postges from an rpm file (pgdg-redhat92-9.2-= 7.noarch.rpm)=C2=A0using yum install.=0AThanks,=0Athara.=0A=0A_____________= ___________________=0AFrom: Albe Laurenz =0ATo: Th= ara Vadakkeveedu ; "pgsql-admin@postgresql.org" =0ASent: Tuesday, September 24, 2013 6:41 AM=0ASubject= : Re: [ADMIN] accidentally deleted data directory=0A=0A=0AThara Vadakkeveed= u wrote:=0A> ps =E2=80=93edf shows no postgres processes:=0A> -bash-4.1$ ps= -edf | grep postgres=0A> root=C2=A0 =C2=A0 =C2=A0 6412=C2=A0 6249=C2=A0 0 = 18:22 pts/0=C2=A0 =C2=A0 00:00:00 su - postgres=0A> postgres=C2=A0 6413=C2= =A0 6412=C2=A0 0 18:22 pts/0=C2=A0 =C2=A0 00:00:00 -bash=0A> postgres=C2=A0= 6465=C2=A0 6413=C2=A0 1 18:27 pts/0=C2=A0 =C2=A0 00:00:00 ps -edf=0A> post= gres=C2=A0 6466=C2=A0 6413=C2=A0 0 18:27 pts/0=C2=A0 =C2=A0 00:00:00 grep p= ostgres=0A=0AOk.=0A=0A> Ran the following command as postgres user=0A> -bas= h-4.1$ /usr/pgsql-9.2/bin/postgres -D /var/lib/pgsql/9.2/data=0A> =0A> pgst= artup.log is empty=0A> =0A> -bash-4.1$ pwd=0A> /var/lib/pgsql/9.2=0A> -bash= -4.1$ ls=0A> backups=C2=A0 data=C2=A0 logfile=C2=A0 pgstartup.log=0A> -bash= -4.1$ ls -al=0A> total 20=0A> drwx------.=C2=A0 4 postgres postgres 4096 Se= p 23 18:21 .=0A> drwx------.=C2=A0 3 postgres postgres 4096 Sep 23 18:18 ..= =0A> drwx------.=C2=A0 2 postgres postgres 4096 Apr=C2=A0 1 19:41 backups= =0A> drwx------. 15 postgres postgres 4096 Sep 23 18:28 data=0A> -rw-------= .=C2=A0 1 postgres postgres=C2=A0 409 Sep 22 11:44 logfile=0A> -rw-------= =C2=A0 1 postgres postgres=C2=A0 =C2=A0 0 Sep 23 18:20 pgstartup.log=0A> -b= ash-4.1$=0A> =0A> Is there something else I can try?=0A=0AYes.=0A=0ALook ho= w logging is configured in /var/lib/pgsql/9.2/data/postgresql.conf=0A(param= eters log_destination, logging_collector, log_directory, log_filename).=0A= =0AFind the log file and see what is in there.=0A=0A> I don=E2=80=99t have = any data to restore. This is an installation which is only a couple of week= s old. I can=0A> uninstall and reinstall if that is easier.=0A=0AI don't kn= ow if that would solve the problem.=0A=0A> Where can I find the uninstaller= ?=0A=0AHow did you install PostgreSQL?=0A=0AYours,=0ALaurenz Albe=0A=0A-- = =0ASent via pgsql-admin mailing list (pgsql-admin@postgresql.org)=0ATo make= changes to your subscription:=0Ahttp://www.postgresql.org/mailpref/pgsql-a= dmin ---723168630-233646349-1380030784=:27416 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
This is what I find in pg_log/postgresql-= Mon.log file (contents relate to my atte= mpts to start postgres yesterday)
 
LOG:  database system wa= s shut down at 2013-09-22 12:20:51 EDT
LOG:  invalid magic number 0= 000 in log file 0, segment 39, offset 0
LOG:  invalid primary check= point record
LOG:  invalid secondary checkpoint record
PANIC:&nb= sp; could not locate a valid checkpoint record
LOG:  startup proces= s (PID 2361) was terminated by signal 6: Aborted
LOG:  aborting sta= rtup 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 r= ecord
LOG:  invalid secondary checkpoint record
PANIC:  cou= ld not locate a valid checkpoint record
LOG:  startup process (PID 6323) was terminated by signal 6: Aborted
LOG:  aborting star= tup due to startup process failure
LOG:  database system was shut d= own at 2013-09-22 12:20:51 EDT
LOG:  invalid magic number 0000 in l= og file 0, segment 39, offset 0
LOG:  invalid primary checkpoint re= cord
LOG:  invalid secondary checkpoint record
PANIC:  coul= d not locate a valid checkpoint record
LOG:  startup process (PID 6= 346) 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@yaho= o.com>
To: Albe Laure= nz <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 director= y

Here are the settings in the postgresql.conf file:
 
I remember turning on logging to troubleshoot a performance issu= e....
 
log_destination =3D 'stderr'      =        
logging_collector =3D on    &nb= sp;           
log_directory =3D 'pg_log'    &= nbsp;          
#log_filename =3D 'postgresql-%a.log'    &nb= sp;
log_truncate_on_rotation=3Don
log_rotation_age =3D 1d     &= nbsp;           &nbs= p;
log_rotation_size =3D 0
 
I installed postges from an rpm file (pgdg-redhat92-9.2-7.noarch.rpm)&= nbsp;using yum install.
Thanks,
thara.
From: Albe Laurenz <laurenz.albe@wien.gv.at>
To: Thara Vadakkeveedu <tharagv@yahoo.com&= gt;; "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 =E2=80=93edf shows no postgres processes:
> -bash-4.1$ ps -ed= f | 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
> postgre= s  6465  6413  1 18:27 pts/0    00:00:00 ps -edf> postgres  6466  6413  0 18:27 pts/0    00:0= 0:00 grep postgres

Ok.

> Ran the following command as post= gres 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 ..
&g= t; 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<= BR>> -bash-4.1$
>
> Is there something else I can try?
<= BR>Yes.

Look how logging is configured in /var/lib/pgsql/9.2/data/po= stgresql.conf
(parameters log_destination, logging_collector, log_direct= ory, log_filename).

Find the log file and see what is in there.
<= BR>> I don=E2=80=99t have any data to restore. This is an installation w= hich is only a couple of weeks old. I can
> uninstall and reinstall i= f that is easier.

I don't know if that would solve the problem.
<= BR>> Where can I find the uninstaller ?

How did you install PostgreSQL?

Yours,
Laurenz Albe

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




---723168630-233646349-1380030784=:27416--