Re: please update ps display for recovery checkpoint
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: "Bossart, Nathan" <bossartn@amazon.com>, Fujii Masao <masao.fujii@oss.nttdata.com>, k.jamison@fujitsu.com, Thomas Munro <thomas.munro@gmail.com>, pgsql-hackers@postgresql.org, Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Date: 2021-06-07T02:13:48Z
Lists: pgsql-hackers
Attachments
- 0001-Show-syncing-data-directories-in-ps-display.patch (text/x-diff)
On Mon, Dec 14, 2020 at 12:01:33PM +0900, Michael Paquier wrote: > On Sat, Dec 12, 2020 at 12:41:25AM +0000, Bossart, Nathan wrote: > > On 12/11/20, 4:00 PM, "Michael Paquier" <michael@paquier.xyz> wrote: > >> My counter-proposal is like the attached, with the set/reset part not > >> reversed this time, and the code indented :p > > > > Haha. LGTM. > > Thanks. I have applied this one, then. To refresh: commit df9274adf adds "checkpoint" info to "ps", which previously continued to say "recovering NNNNN" even after finishing WAL replay, and throughout the checkpoint. Now, I wonder whether the startup process should also include some detail about "syncing data dir". It's possible to strace the process to see what it's doing, but most DBA would probably not know that, and it's helpful to know the status of recovery and what part of recovery is slow: sync, replay, or checkpoint. commit df9274adf improved the situation between replay and ckpoint, but it's still not clear what "postgres: startup" means before replay starts. There's some interaction between Thomas' commit 61752afb2 and recovery_init_sync_method - if we include a startup message, it should distinguish between "syncing data dirs (fsync)" and (syncfs). Putting this into fd.c seems to assume that we can clobber "ps", which is fine when called by StartupXLOG(), but it's a public interface, so I'm not sure if it's okay to assume that's the only caller. Maybe it should check if MyAuxProcType == B_STARTUP. -- Justin
Commits
-
Provide recovery_init_sync_method=syncfs.
- 61752afb2640 14.0 cited
-
Add some checkpoint/restartpoint status to ps display
- df9274adf309 14.0 landed