Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VOTJK-0000em-JL for pgsql-admin@arkaria.postgresql.org; Tue, 24 Sep 2013 14:09:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VOTJK-0001LI-0T for pgsql-admin@arkaria.postgresql.org; Tue, 24 Sep 2013 14:09:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VOTJJ-0001LA-1H for pgsql-admin@postgresql.org; Tue, 24 Sep 2013 14:09:53 +0000 Received: from nm43-vm10.bullet.mail.bf1.yahoo.com ([216.109.114.171]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VOTJD-0000mp-VI for pgsql-admin@postgresql.org; Tue, 24 Sep 2013 14:09:52 +0000 Received: from [98.139.214.32] by nm43.bullet.mail.bf1.yahoo.com with NNFMP; 24 Sep 2013 14:09:45 -0000 Received: from [98.139.212.223] by tm15.bullet.mail.bf1.yahoo.com with NNFMP; 24 Sep 2013 14:09:45 -0000 Received: from [127.0.0.1] by omp1032.mail.bf1.yahoo.com with NNFMP; 24 Sep 2013 14:09:45 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 796405.87821.bm@omp1032.mail.bf1.yahoo.com Received: (qmail 88961 invoked by uid 60001); 24 Sep 2013 14:09:45 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1380031785; bh=tjDQE4wxgDtXXobpuEA34m+DSto9kETu2Ol33KrdAHQ=; 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=TtH8bo/DPPAYZbLrjudcIaaMxF3b4zbMq8Cq0/+qtS+Yq+YAzs/aBYqZ6vXJoqqxRoqLirV3SXFaKkwnfnZNRbzzwc2tBGwnPT01+Hrbqf2AGn1w4rmR+a1L43M1GqFohZTCOLjSpYGjWjQyMRAyT1Cbf5OYxnVkKQ5fjMvEbCI= 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=eelVVXjTS56ZU1Kd8IOhSGsqH1jdL2ZBs0cBZkUJbNXIjlG70NXGwRz/3g205GH4m5w0Aav9dKTEmNC+TVqOlAYzauobba9f1opSxIqO3TDGAZU63S1fMCh1bfuhw27T1UD96MmEg/m76+wkYpMuIdZSGxWvRyVcgHyyhp0nu4o=; X-YMail-OSG: .ln7mBIVM1k2qcYMr53O9VPSM1wJS9NLk215MLhlKfSoVWB vpz99_.YzRAR0FXV1CQSOMHY6JH1ZqPmRZXzhSWhYRhwBxGODYiSZ6Y2WiOJ A0EHtUbclOlbBifsqzex1DUtBhVXq6uE2YXz86xdivB_qc5Gu01CDRzikbBm fn6XyuMkXGaKDcKpXz7ZZSM5w5okkpQLOcwxJN_uTDN_VPplxGHsS3pHiEQf xOe9cwbZE7wqBUIMfu1hpyEZCVG.ks8bcr321cRKVywbtqoyfW7JxWNPaL8b ceOGbmx1SLgYdLV1blDAQGZFJGBNgBBRvL7bCb74qQSAW_NXX2mbplAzAWqN vuiwkOEaATJpz6PbCP.AJlQroOQcUMTBdfWIA7VHUbaaakfc6NAwx8jj.2u1 gSP6RflS46NqxX5HS9h2iATdXwJWNmqxq7GCkmroBAGUOCzSHSFbQGKYZ580 PhHJgYs5UQzqMNQZvjJgFy62eeBlKqc8CRCNxq.JYXBtMfbq4BmRzph4hCow XvEeK9p8a0VN5N_FHJFg8jokZXbDnuSQ1S.hG6mj62RS2maguGpP0.3qq3Cu kENE8lbhCl68GnqaIHluafn3iy.BwDCk8nxoi Received: from [50.241.80.25] by web125005.mail.ne1.yahoo.com via HTTP; Tue, 24 Sep 2013 07:09:45 PDT X-Rocket-MIMEInfo: 002.001, CgpEbyBJIG5lZWQgdG8gcnVuIHBnX3Jlc2V0eGxvZyB0byBmaXggdGhlIGNvcnJ1cHRlZCBwZ19jb250cm9sIGZpbGUgaXNzdWU_IArCoApJIGNhbid0IGZpbmQgaXQgaW4gbXkgOS4yIGluc3RhbGxhdGlvbi4uLgp0aGFua3MKVEcKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCkZyb206IFRoYXJhIFZhZGFra2V2ZWVkdSA8dGhhcmFndkB5YWhvby5jb20.ClRvOiBUaGFyYSBWYWRha2tldmVlZHUgPHRoYXJhZ3ZAeWFob28uY29tPjsgQWxiZSBMYXVyZW56IDxsYXVyZW56LmFsYmVAd2llbi5ndi4BMAEBAQE- 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> <1380030784.27416.YahooMailNeo@web125003.mail.ne1.yahoo.com> Message-ID: <1380031785.83405.YahooMailNeo@web125005.mail.ne1.yahoo.com> Date: Tue, 24 Sep 2013 07:09:45 -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: <1380030784.27416.YahooMailNeo@web125003.mail.ne1.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="1988236031-118142729-1380031785=:83405" 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 --1988236031-118142729-1380031785=:83405 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =0A=0ADo I need to run pg_resetxlog to fix the corrupted pg_control file is= sue? =0A=C2=A0=0AI can't find it in my 9.2 installation...=0Athanks=0ATG=0A= =0A________________________________=0AFrom: Thara Vadakkeveedu =0ATo: Thara Vadakkeveedu ; Albe Laurenz ; "pgsql-admin@postgresql.org" =0ASent: Tuesday, September 24, 2013 9:53 AM=0ASubject: Re: [ADMIN] accid= entally deleted data directory=0A=0A=0A=0AThis is what I find in pg_log/pos= tgresql-Mon.log file (contents relate to=C2=A0my attempts to start postgres= yesterday)=0A=C2=A0=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, segme= nt 39, offset 0=0ALOG:=C2=A0 invalid primary checkpoint record=0ALOG:=C2=A0= invalid secondary checkpoint record=0APANIC:=C2=A0 could not locate a vali= d checkpoint record=0ALOG:=C2=A0 startup process (PID 2361) was terminated = by signal 6: Aborted=0ALOG:=C2=A0 aborting startup due to startup process f= ailure=0ALOG:=C2=A0 database system was shut down at 2013-09-22 12:20:51 ED= T=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 secon= dary checkpoint record=0APANIC:=C2=A0 could not locate a valid checkpoint r= ecord=0ALOG:=C2=A0 startup process (PID 6323) was terminated by signal 6: A= borted=0ALOG:=C2=A0 aborting 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 checkpoint record=0ALOG:=C2=A0 invalid secondary checkp= oint record=0APANIC:=C2=A0 could not locate a valid checkpoint record=0ALOG= :=C2=A0 startup process (PID 6346) was terminated by signal 6: Aborted=0ALO= G:=C2=A0 aborting startup due to startup process failure=0ALOG:=C2=A0 datab= ase system was shut down at 2013-09-22 12:20:51 EDT=0ALOG:=C2=A0 invalid ma= gic 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@postgresql.org" =0ASent: Tuesday, September 24, 2013 9:47 AM=0ASubject: Re: [ADMIN] ac= cidentally deleted data directory=0A=0A=0A=0AHere are the settings in the p= ostgresql.conf file:=0A=C2=A0=0AI remember turning on logging to troublesho= ot 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=0Alog= ging_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 'postgresql-%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_rotation_size =3D 0 =0A=0AI installed po= stges from an rpm file (pgdg-redhat92-9.2-7.noarch.rpm)=C2=A0using yum inst= all.=0AThanks,=0Athara.=0A=0A________________________________=0AFrom: Albe = Laurenz =0ATo: Thara Vadakkeveedu ; "pgsql-admin@postgresql.org" =0ASent: Tue= sday, September 24, 2013 6:41 AM=0ASubject: Re: [ADMIN] accidentally delete= d data directory=0A=0A=0AThara Vadakkeveedu wrote:=0A> ps =E2=80=93edf show= s 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> postgres=C2=A0 6466=C2=A0 6413=C2=A0 0= 18:27 pts/0=C2=A0 =C2=A0 00:00:00 grep postgres=0A=0AOk.=0A=0A> Ran the fo= llowing command as postgres user=0A> -bash-4.1$ /usr/pgsql-9.2/bin/postgres= -D /var/lib/pgsql/9.2/data=0A> =0A> pgstartup.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 Sep 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 postgre= s 4096 Sep 23 18:28 data=0A> -rw-------.=C2=A0 1 postgres postgres=C2=A0 40= 9 Sep 22 11:44 logfile=0A> -rw-------=C2=A0 1 postgres postgres=C2=A0 =C2= =A0 0 Sep 23 18:20 pgstartup.log=0A> -bash-4.1$=0A> =0A> Is there something= else I can try?=0A=0AYes.=0A=0ALook how logging is configured in /var/lib/= pgsql/9.2/data/postgresql.conf=0A(parameters log_destination, logging_colle= ctor, 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 insta= llation which is only a couple of weeks old. I can=0A> uninstall and reinst= all if that is easier.=0A=0AI don't know if that would solve the problem.= =0A=0A> Where can I find the uninstaller ?=0A=0AHow did you install Postgre= SQL?=0A=0AYours,=0ALaurenz Albe=0A=0A-- =0ASent via pgsql-admin mailing lis= t (pgsql-admin@postgresql.org)=0ATo make changes to your subscription:=0Aht= tp://www.postgresql.org/mailpref/pgsql-admin --1988236031-118142729-1380031785=:83405 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

Do I need to run pg_resetxlog to fix the corrupted pg_con= trol file issue?
 
I can't find it in my 9.2 installation...
thanks
TG
From: Thara Vadakkeveedu <tharagv@yaho= o.com>
To: Thara Vada= kkeveedu <tharagv@yahoo.com>; Albe Laurenz <laurenz.albe@wien.gv.a= t>; "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 st= art 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, offs= et 0
LOG:  invalid primary checkpoint record
LOG:  invalid = secondary checkpoint record
PANIC:  could not locate a valid checkp= oint record
LOG:  startup process (PID 2361) was terminated by sign= al 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 0LOG:  invalid primary checkpoint record
LOG:  invalid seconda= ry checkpoint record
PANIC:  could not locate a valid checkpoint re= cord
LOG:  startup process (PID 6323) was terminated by signal 6: Aborted
LOG:  aborting startup due to startup process failureLOG:  database system was shut down at 2013-09-22 12:20:51 EDT
LO= G:  invalid magic number 0000 in log file 0, segment 39, offset 0
L= OG:  invalid primary checkpoint record
LOG:  invalid secondary= checkpoint record
PANIC:  could not locate a valid checkpoint reco= rd
LOG:  startup process (PID 6346) was terminated by signal 6: Abo= rted
LOG:  aborting startup due to startup process failure
LOG:&= nbsp; 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
"postgre= sql-Mon.log" 49L, 2709C
 
thanks
thara.

From: Thara Vadakkeveedu <tharagv@yahoo.com>
To: Albe Laurenz <laurenz.albe@wien.gv.at&= gt;; "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 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






--1988236031-118142729-1380031785=:83405--