Обсуждение: Lost pg_xlog pgclog

Поиск
Список
Период
Сортировка

Lost pg_xlog pgclog

От
"Philip Geer"
Дата:
I had move my pgxlog and pgclog files to a drive of their own and that drive crashed with no chance of data recovery. This is not a production server so its not that big of a deal but I would like to recover the databases that the server had on it but ever time I start postmaster I get the following error.
 
DEBUG:  database system was interrupted at 2003-02-14 00:15:56 EST
DEBUG:  open of /pgdata/pg_xlog/0000000000000017 (log file 0, segment 23) failed: No such file or directory
DEBUG:  invalid primary checkpoint record
DEBUG:  open of /pgdata/pg_xlog/0000000000000017 (log file 0, segment 23) failed: No such file or directory
DEBUG:  invalid secondary checkpoint record
FATAL 2:  unable to locate a valid checkpoint record
DEBUG:  startup process (pid 29291) exited with exit code 2
DEBUG:  aborting startup due to startup process failure
 
Can I recover from this error or no?
 
Thanks
 
Philip Geer
Internet Specialist
Janus Hotels and Resorts
Phone:  (616) 363-9001 ext 7804
Cell: (616) 835-2723
Fax (616)  363-0670

Re: Lost pg_xlog pgclog

От
Tom Lane
Дата:
"Philip Geer" <philg@gearcc.com> writes:
> I had move my pgxlog and pgclog files to a drive of their own and that driv=
> e crashed with no chance of data recovery. This is not a production server =
> so its not that big of a deal but I would like to recover the databases tha=
> t the server had on it but ever time I start postmaster I get the following=
>  error.=20

You could try running pg_resetxlog (see contrib if pre-7.3; in 7.3 it's
standard).  That should let you start the database, but keep in mind
that any transactions completed shortly before the crash might be
missing or partially applied.  Don't trust the data too much until
you've checked it.  And definitely do a dump and reload...

            regards, tom lane