From: | Tulio Oliveira <tulio(at)marilia(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Tulio Oliveira <mestredosmagos(at)marilia(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: I lost the pg_control file |
Date: | 2001-05-06 11:49:57 |
Message-ID: | 3AF53A65.35069CC@marilia.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane wrote:
>
> Tulio Oliveira <mestredosmagos(at)marilia(dot)com> writes:
> > I just lost the pg_control file, located in /usr/local/pgsql/data/global
>
> How did that happen?
>
> > I start a new INITDB after rename the PG_DATA directory to another name,
> > but if I copy the pg_control file to real data directory, I receive a
> > "NO FILE POINTER ERROR"...
>
> I think you could recover by copying in a freshly-initialized pg_control
> (be sure you make it with the same locale setting as before!) and then
> running the pg_resetxlog utility from contrib. You'll probably have to
> use the -f switch to pg_resetxlog ... read its README file!
>
> Once you get the postmaster to start, do NOT make any changes to the
> database, or you will be very sorry :-(. Run pg_dumpall, then reload
> the data into a correctly initialized database.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://www.postgresql.org/search.mpl
Thanks, Tom Lane,
But I can't compile the pg_resetxlog !!!
in /usr/src/postgresql-7.1rc4/contrib/pg_resetxlog directory, I typed
"make" and the result is:
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations
-I../../src/include
-c -o pg_resetxlog.o pg_resetxlog.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations pg_resetxlog.o
pg_crc.o -Wl,-rpath,/usr/local/pgsql/lib -lz -lcrypt -lresolv -lnsl
-ldl -lm -lbsd -o pg_resetxlog
/usr/bin/ld: cannot find -lbsd
collect2: ld returned 1 exit status
make: *** [pg_resetxlog] Error 1
And even I chmod 777 pg_resetxlog, and try ./pg_resetxlog -f $PGDATA, I
get an error "bash: ./pg_resetxlog.o: cannot execute binary
file"
Please, what can I do ???
regards,
tulio oliveira
--
Tulio Oliveira
Akácia Tecnologia
www.akacia.com.br
tulio(at)akacia(dot)com(dot)br
From | Date | Subject | |
---|---|---|---|
Next Message | Tulio Oliveira | 2001-05-06 11:52:00 | Re: I lost the pg_control file |
Previous Message | Lincoln Yeoh | 2001-05-06 10:32:04 | Re: OODBMS vs. RDBMS |