Re: A few new options for CHECKPOINT

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Bernd Helmle <mailings(at)oopsware(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>, "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A few new options for CHECKPOINT
Date: 2020-11-25 18:59:12
Message-ID: 8E47A31D-65AD-43B4-96EE-316CCB144616@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks to all for the feedback. I've attached v2 of the patch. I've
removed the WAIT and FORCE options and renamed IMMEDIATE to FAST.

On 11/25/20, 7:52 AM, "Stephen Frost" <sfrost(at)snowman(dot)net> wrote:
> I'm a bit confused by the idea here.. The whole point of running a
> CHECKPOINT is to get the immediate behavior with the IO spike to get
> things flushed out to disk so that, on crash recovery, there's less
> outstanding WAL to replay.
>
> Avoiding the IO spike implies that you're waiting for a regular
> checkpoint and that additional WAL is building up since that started and
> therefore you're going to have to replay that WAL during crash recovery
> and so you won't end up reducing your recovery time, so I'm failing to
> see the point..? I don't think you really get to have both.. pay the
> price at backup time, or pay it during crash recovery.

It's true that you might not lower recovery time as much as if you did
an immediate checkpoint, but presumably there can still be some
benefit from doing a non-immediate checkpoint. I think a similar
argument can be made for pg_start_backup(), which AFAICT is presently
the only way to manually request a non-immediate checkpoint.

Nathan

Attachment Content-Type Size
v2-0001-Add-FAST-option-to-CHECKPOINT.patch application/octet-stream 10.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-11-25 19:04:09 Re: Improper use about DatumGetInt32
Previous Message David Christensen 2020-11-25 18:45:51 Re: [PATCH] Add `truncate` option to subscription commands