Run checkpointer and bgwriter in crash recovery.
Thomas Munro <tmunro@postgresql.org>
Run checkpointer and bgwriter in crash recovery. Start up the checkpointer and bgwriter during crash recovery (except in --single mode), as we do for replication. This wasn't done back in commit cdd46c76 out of caution. Now it seems like a better idea to make the environment as similar as possible in both cases. There may also be some performance advantages. Reviewed-by: Robert Haas <robertmhaas@gmail.com> Reviewed-by: Aleksander Alekseev <aleksander@timescale.com> Tested-by: Jakub Wartak <Jakub.Wartak@tomtom.com> Discussion: https://postgr.es/m/CA%2BhUKGJ8NRsqgkZEnsnRc2MFROBV-jCnacbYvtpptK2A9YYp9Q%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/xlog.c | modified | +12 −21 |
| src/backend/postmaster/bgwriter.c | modified | +0 −3 |
| src/backend/postmaster/checkpointer.c | modified | +0 −3 |
| src/backend/postmaster/postmaster.c | modified | +7 −10 |
| src/backend/storage/sync/sync.c | modified | +3 −27 |
| src/include/storage/sync.h | modified | +0 −1 |
Discussion
- Background writer and checkpointer in crash recovery 24 messages · 2020-08-30 → 2022-09-22