Deleted pg_log fix

Поиск
Список
Период
Сортировка
От Larry Host
Тема Deleted pg_log fix
Дата
Msg-id 000a01c0711b$2575b2a0$c30010ac@fusionnet.net
обсуждение исходный текст
Список pgsql-admin
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 method.
 
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=true;" IMMEDIATELY AFTER "AMI_OVERRIDE=flag;"
 
/usr/src/postgresql-7.0.2/src/backend/access/transam/xact.c
  line 238 or so
  added "AMI_OVERRIDE=true;" IMMEDIATELY AFTER "AMI_OVERRIDE=false;"
 
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, replacing 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

В списке pgsql-admin по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] Toad version for PostgreSQL
Следующее
От: Max Wiberg
Дата:
Сообщение: Error opening pgaccess