Re: when postgres failed to recover after the crash...

Поиск
Список
Период
Сортировка
От anypossibility
Тема Re: when postgres failed to recover after the crash...
Дата
Msg-id 12c4f678d64.7059384957819226523.-2090971354971877732@zoho.com
обсуждение исходный текст
Ответ на Re: when postgres failed to recover after the crash...  (Gabriele Bartolini <gabriele.bartolini@2ndQuadrant.it>)
Ответы Re: when postgres failed to recover after the crash...  (Craig Ringer <craig@postnewspapers.com.au>)
Список pgsql-general
Gabriele, 
Thank you for the link. I downloaded the book and read the chapter. Very useful information.

Craig,
The storage type is SAN over AFP. 

Unfortunately, it has been a week or so since the crash. We were able to recover lost data from last backup (a few hours old) but next time, I will copy entire data directory before restart the server (thank you for the advice).

Here is the copy from pg_log:

Log from 09:19 PM (First time the volume was disconnected)
LOG:  database system was interrupted; last known up at 2010-11-10 21:01:40 MST
LOG:  database system was not properly shut down; automatic recovery in progress
LOG:  record with zero length at 4C/EAA135CC
LOG:  redo is not required
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started

Log from 09:27 PM (When volume was re-mounted)
LOG:  database system was interrupted; last known up at 2010-11-10 21:19:13 MST
LOG:  database system was not properly shut down; automatic recovery in progress
LOG:  record with zero length at 4C/EAA1360C
LOG:  redo is not required
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
LOG:  received smart shutdown request
LOG:  autovacuum launcher shutting down
LOG:  shutting down
LOG:  database system is shut down 










---- On Sun, 14 Nov 2010 18:40:29 -0800 Gabriele Bartolini <gabriele.bartolini@2ndQuadrant.it> wrote ----

Hi,
> In general, it's a really bad idea to run PostgreSQL (or any other
> database) over file-level network storage like SMB/AFP/CIFS/NFS.
> Block-level network storage like iSCSI is generally OK, depending on the
> quality of the drivers in target and initiator.

What Craig says it is true and it might be worth reading the free
chapter about "Database Hardware" from Greg's book on high performance,
which you can download from
http://blog.2ndquadrant.com/en/2010/10/postgresql-90-high-performance.html

> Before you do anything more, make a COMPLETE COPY of the entire data
> directory, including the pg_clog, pg_xlog, etc directories as well as
> the main data base storage. Put it somewhere safe and do not touch it
> again, because it might be critical for recovery.
Yes, also in case you had any tablespace do not forget about them. But a
cold backup in this cases it is always a good thing.

Ciao,
Gabriele

--
Gabriele Bartolini - 2ndQuadrant Italia
PostgreSQL Training, Services and Support
gabriele.bartolini@2ndQuadrant.it | www.2ndQuadrant.it


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Willy-Bas Loos
Дата:
Сообщение: generate query string in trigger func
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: generate query string in trigger func