Add a log message on recovery startup before syncing datadir - Mailing list pgsql-hackers

From Michael Banck
Subject Add a log message on recovery startup before syncing datadir
Date
Msg-id 4a5d233fcd28b5f1008aec79119b02b5a9357600.camel@credativ.de
Whole thread Raw
Responses Re: Add a log message on recovery startup before syncing datadir
List 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

Attachment

pgsql-hackers by date:

Previous
From: Pavel Borisov
Date:
Subject: Re: [PATCH] Automatic HASH and LIST partition creation
Next
From: Thomas Munro
Date:
Subject: Re: Add a log message on recovery startup before syncing datadir