Add a log message on recovery startup before syncing datadir

Поиск
Список
Период
Сортировка
От Michael Banck
Тема Add a log message on recovery startup before syncing datadir
Дата
Msg-id 4a5d233fcd28b5f1008aec79119b02b5a9357600.camel@credativ.de
обсуждение исходный текст
Ответы Re: Add a log message on recovery startup before syncing datadir  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
Hi,

we had a customer incident recently where they needed to do a PITR.
Their data directory is on a NetApp NFS and they have several hundred
databases in their instance. The startup sync (i.e. before the message
"starting archive recovery" appears) took 20 minutes and during the
first try[1] they were wondering what's going on because there is just
one log message ("database system was interrupted; last known up at
...") and the postmaster process is in state 'D'. Attaching strace
revealed that it was syncing files and due to the NFS performance that
took a long time.

I propose to add a message "syncing data directory" before running
SyncDataDirectory() in StartupXLOG() to make that more apparent to the
user, see attached. That should make it clear to users that Postgres is
going to do some work, which, depending on their hardware, could take a
bit.

Thoughts?


Michael

[1] don't ask

-- 
Michael Banck
Projektleiter / Senior Berater
Tel.: +49 2166 9901-171
Fax:  +49 2166 9901-100
Email: michael.banck@credativ.de

credativ GmbH, HRB Mönchengladbach 12080
USt-ID-Nummer: DE204566209
Trompeterallee 108, 41189 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer

Unser Umgang mit personenbezogenen Daten unterliegt
folgenden Bestimmungen: https://www.credativ.de/datenschutz

Вложения

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

Предыдущее
От: Pavel Borisov
Дата:
Сообщение: Re: [PATCH] Automatic HASH and LIST partition creation
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Add a log message on recovery startup before syncing datadir