Re: starting postgres with an empty px_xlog folder

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: starting postgres with an empty px_xlog folder
Дата
Msg-id 4FE5D68A0200002500048A32@gw.wicourts.gov
обсуждение исходный текст
Ответ на starting postgres with an empty px_xlog folder  (Mike Broers <mbroers@gmail.com>)
Ответы Re: starting postgres with an empty px_xlog folder
Список pgsql-admin
Mike Broers  wrote:
> Mike Broers  wrote:

>> We shut down our postgres 8.3 server last night cleanly for some
>> hosted services maintenance. When we got our server back, it didnt
>> have the pg_xlog mount with files and now when we start the
>> server, it complains

>> Since we had a clean shut down is there an easy or relatively
>> clean way to start back up? the pg_xlog folder is there, just with
>> no files. i wouldnt think it would be needed for a clean restart.

It is.

> I was able to duplicate the error in a test environment and get the
> database started back up wtih the pg_resetxlog $PGDATA command, but
> i am concerned about the fallout and not sure if i need to use any
> of the option switches. We also have archived log files up to the
> point of server shutdown if that provides a better option.

I would make a copy of the directory tree of the database cluster
while the server is stopped before attempting any recovery.

http://wiki.postgresql.org/wiki/Corruption

The archived WAL files, may provide a better option that
pg_resetxlog.

If it were my data, I would be inclined to use pg_dump to create a
fresh version of the database after recovery, although if you really
have a full set of archived WAL files and the server starts up
without any indications of problems in the server log, you might be
OK without doing that.

As previously stated, make sure you understand how this happened, so
you can make sure it doesn't happen again.  The contents of the
pg_xlog directory are an integral part of your database cluster.

-Kevin

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

Предыдущее
От: Ray Stell
Дата:
Сообщение: Re: starting postgres with an empty px_xlog folder
Следующее
От: Greg Williamson
Дата:
Сообщение: Re: autovac hitting too many tables at once