Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id eBU2aWL62885 for ; Fri, 29 Dec 2000 21:36:32 -0500 (EST) (envelope-from pgsql-admin-owner@postgresql.org) Received: from mail.fusion-net.net ([207.110.3.59]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id eBSM3AL35209 for ; Thu, 28 Dec 2000 17:03:10 -0500 (EST) (envelope-from tfbu@tierratelecom.com) Received: (qmail 7361 invoked from network); 28 Dec 2000 22:03:17 -0000 Received: from dot55.tierratel.com (HELO larry) (@207.110.3.55) by dot59.tierratel.com with SMTP; 28 Dec 2000 22:03:17 -0000 Message-ID: <000a01c0711b$2575b2a0$c30010ac@fusionnet.net> From: "Larry Host" To: Subject: Deleted pg_log fix Date: Thu, 28 Dec 2000 14:11:36 -0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0007_01C070D8.1707AE00" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200012/169 X-Sequence-Number: 366 This is a multi-part message in MIME format. ------=_NextPart_000_0007_01C070D8.1707AE00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Yup, I did it. Forced pg_log empty and almost lost EVERYTHING! This is a RedHat 6.2 on an i386 class system. Thanks to a few threads in this group, I was able to save 100% of my data, = almost a gig. I do not use XID's and have been warned that they may be lost using this me= thod. What I did: First thing I did was make a huge tarball of the entire data directory for = safety. I then edited the following 2 files in the postgresql-7.0.2 source tree /usr/src/postgresql-7.0.2/src/backend/access/transam/transsup.c line 44 or so added "AMI_OVERRIDE=3Dtrue;" IMMEDIATELY AFTER "AMI_OVERRIDE=3Dflag;" /usr/src/postgresql-7.0.2/src/backend/access/transam/xact.c line 238 or so added "AMI_OVERRIDE=3Dtrue;" IMMEDIATELY AFTER "AMI_OVERRIDE=3Dfalse;" Then return to /usr/src/postgresql-7.0.2/src and gmake clean gmake gmake install Then went to /usr/local/pgsql/bin and cp'd all files to my /usr/bin, replac= ing the old pg commands At this point I was able to use "pg_dump -di" on each database and recover = all schema and data 100%. I then unmodified the files, recompiled and reloaded the execs to /usr/bin,= created a new db and used psql to read in the old data and schema. This might not work for everyone but it saved MY ass and I hope it can save= yours. Larry Host CTO Tierra Telecom, Inc. 858-587-2218 858-587-2451 Fax tfbu@tierratelecom.com ------=_NextPart_000_0007_01C070D8.1707AE00 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Yup, I did it. Forced pg_log empty and alm= ost lost=20 EVERYTHING!
 
This is a RedHat 6.2 on an i386 class=20 system.
 
Thanks to a few threads in this group, I w= as able=20 to save 100% of my data, almost a gig.
 
I do not use XID's and have been warned th= at they=20 may be lost using this method.
 
What I did:
 
First thing I did was make a huge tarball = of the=20 entire data directory for safety.
 
I then edited the following 2 files in the= =20 postgresql-7.0.2 source tree
 
/usr/src/postgresql-7.0.2/src/backend/access/transam/transsup.c
  line 44 or so
  added "AMI_OVERRIDE=3Dtrue;" IMMEDI= ATELY AFTER=20 "AMI_OVERRIDE=3Dflag;"
 
/usr/src/postgresql-7.0.2/src/backend/access/transam/xact.c=
  line 238 or so
  added "AMI_OVERRIDE=3Dtrue;" IMMEDI= ATELY AFTER=20 "AMI_OVERRIDE=3Dfalse;"
 
Then return to /usr/src/postgresql-7.0.2/src and
 
gmake clean
gmake
gmake install
 
Then went to /usr/local/pgsql/bin and cp'd all files to my /usr/bin,= =20 replacing the old pg commands
 
At this point I was able to use "pg_dump -di" on each database an= d=20 recover all schema and data 100%.
 
I then unmodified the files, recompiled and reloaded the execs to /usr= /bin,=20 created a new db and used psql to read in the old data and schema.
 
This might not work for everyone but it saved MY ass and I hope it can= save=20 yours.
 
Larry Host
CTO
Tierra Telecom,=20 Inc.
858-587-2218
858-587-2451 Fax
tfbu@tierratelecom.com
------=_NextPart_000_0007_01C070D8.1707AE00--