Re: any impact to DML sql statements when checkpoint starting - Mailing list pgsql-admin

From David G. Johnston
Subject Re: any impact to DML sql statements when checkpoint starting
Date
Msg-id CAKFQuwaMpXymDhzPNyvcLsjxxw9k5zCD_LBXgFKdGDQWhD9UTQ@mail.gmail.com
Whole thread Raw
In response to RE: any impact to DML sql statements when checkpoint starting  ("James Pang (chaolpan)" <chaolpan@cisco.com>)
List pgsql-admin

On Thursday, February 3, 2022, James Pang (chaolpan) <chaolpan@cisco.com> wrote:

When Postgres checkpoint,  it always write buffers from pg shared_buffers  to  OS filesystem cache,  after that,  it finally make a system call  fsync , that will flush dirty blocks from OS filesystem cache to disk, right?


Please don’t top-post.

From the docs:

On Linux and POSIX platforms checkpoint_flush_after allows to force the OS that pages written by the checkpoint should be flushed to disk after a configurable number of bytes. Otherwise, these pages may be kept in the OS's page cache, inducing a stall when fsync is issued at the end of a checkpoint. This setting will often help to reduce transaction latency, but it also can have an adverse effect on performance; particularly for workloads that are bigger than shared_buffers, but smaller than the OS's page cache.

David J. 

pgsql-admin by date:

Previous
From: "James Pang (chaolpan)"
Date:
Subject: RE: any impact to DML sql statements when checkpoint starting
Next
From: Michael Banck
Date:
Subject: Re: Problem starting two postgresql clusters on the same host