Re: FATAL error after a system crash
От | Feng-Cheng Chang |
---|---|
Тема | Re: FATAL error after a system crash |
Дата | |
Msg-id | 3CD6A94F.4010408@alumni.nctu.edu.tw обсуждение исходный текст |
Ответ на | FATAL error after a system crash (Feng-Cheng Chang <breeze@alumni.nctu.edu.tw>) |
Список | pgsql-general |
Tom Lane wrote:
I started postmaster and connected to it using psql without error messages. When I tried to pg_dumpall or pg_dump, the message "cannot open pg_inherits: no such file or directory" appeared. Although I couldn't dump the database, I use SQL COPY to save all needed tables to files :-D After the table-by-table recovery, my application was back!
Thank you for your great help :-)
Things went like what you said....Feng-Cheng Chang <breeze@alumni.nctu.edu.tw> writes:"FATAL 1: cannot open pg_variable: no such file or directory" and terminates the connection.Well, if that's the only problem, you got (very) lucky. 7.1.* doesn't actually use pg_variable, but there is still vestigial code in it that tries to open that file during startup. All you need is an empty file of the right name, so try touch $PGDATA/global/1264 But I fear that'll just let you get to the next problem :-(. If Windoze managed to lose that file, it probably managed to lose other stuff too. If it does seem to start up okay, I'd recommend trying to do pg_dumpall, and then initdb and reload if the dump process doesn't show errors.
I started postmaster and connected to it using psql without error messages. When I tried to pg_dumpall or pg_dump, the message "cannot open pg_inherits: no such file or directory" appeared. Although I couldn't dump the database, I use SQL COPY to save all needed tables to files :-D After the table-by-table recovery, my application was back!
Thank you for your great help :-)
I don't think it is a good setup, either. If I had a spare machine, I would like to install a UNIX-like system and move my application to it. Anyway, thank you for your suggestion. I'll never forget to backup periodically :-)Win2k server cygwin + postgresql 7.1.3This is not a production-grade setup IMHO. If you don't want to run a real OS to put Postgres on top of, you'd better be a lot more religious about backing up.
-- Feng-Cheng Chang (張 峰 誠) Ph.D. Student of Communication Electronics & Signal Processing Laboratory, Institute of Electronics, NCTU, Taiwan, R.O.C. E-mail: fcchang.ee88g@nctu.edu.tw
В списке pgsql-general по дате отправления: