A few new options for CHECKPOINT

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: A few new options for CHECKPOINT
Date: 2020-11-24 22:23:34
Message-ID: 17A03557-CF5C-4D4B-B719-A1D98DD75E75@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

I've attached a patch to add a few new options to CHECKPOINT that
might be useful. Specifically, it adds the FORCE, IMMEDIATE, and WAIT
options. All of these options are already implemented internally, but
it is not possible to adjust them for manually triggered checkpoints.
The bulk of this change is dedicated to expanding the syntax of
CHECKPOINT and adding detailed documentation.

I've mostly followed the pattern set forth by the options recently
added to VACUUM. With this patch, CHECKPOINT takes an optional set of
parameters surround by parentheses. The new parameters are enabled by
default but can be disabled by specifying FALSE, OFF, or 0.

The main purpose of this patch is to give users more control over
their manually requested checkpoints or restartpoints. I suspect the
most useful option is IMMEDIATE, which can help avoid checkpoint-
related IO spikes. However, I didn't see any strong reason to prevent
users from also adjusting FORCE and WAIT.

Nathan

Attachment Content-Type Size
v1-0001-Add-FORCE-IMMEDIATE-and-WAIT-options-to-CHECKPOIN.patch application/octet-stream 13.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-11-24 22:59:17 Re: Libpq support to connect to standby server as priority
Previous Message Alvaro Herrera 2020-11-24 21:57:13 Re: remove spurious CREATE INDEX CONCURRENTLY wait