Re: Checkpoint taking long - Mailing list pgsql-admin

From Vijaykumar Jain
Subject Re: Checkpoint taking long
Date
Msg-id CAM+6J94+xrtj6cDnjU2s1H6Y6gP-26XtTO76RGO_CNwsXZo3YQ@mail.gmail.com
Whole thread Raw
In response to Checkpoint taking long  (Yambu <hyambu@gmail.com>)
List pgsql-admin
On Tue, 20 Jul 2021 at 12:47, Yambu <hyambu@gmail.com> wrote:
Hello

Can i kill a checkpoint process that has been running for 8hrs, below are from pg_stat_activity


wait_event_type=IO
wait_event=DataFileFlush
backend_type=checkpointer


Is/was the backend storage having any issues, fsync slow? 
i think killing  checkpointer should be ok, as it will run again when it reaches the thresholds of checkpoint_timeout or max_wal_size.
DataFileFlush: Waiting for a relation data file to reach durable storage. 

as the checkpoint is basically doing the below, it should not be a problem to kill it if is long running.
also , do you see this multiple times? if yes, can you try enabling log_checkpoints so it would give an idea of how many buffers were written,
so as to help understand why it was waiting forever on IO. 

1. Identify all the dirty pages in shared buffers.
2. Write the dirty pages to the respective files.
3. Issue fsync() on all the modified files to disk.

--
Thanks,
Vijay
Mumbai, India

pgsql-admin by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Explain out put
Next
From: Licio Matos
Date:
Subject: HIBERNATE - logs EXPLAIN OUTPUT JSON