Re: A few new options for CHECKPOINT

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>, "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>
Cc: "'Bossart, Nathan'" <bossartn(at)amazon(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A few new options for CHECKPOINT
Date: 2020-11-25 05:32:05
Message-ID: b1d83ae4-5cb3-ce6c-7f86-1048ab88593f@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020/11/25 13:47, Michael Paquier wrote:
> On Wed, Nov 25, 2020 at 01:07:47AM +0000, tsunakawa(dot)takay(at)fujitsu(dot)com wrote:
>> From: Bossart, Nathan <bossartn(at)amazon(dot)com>
>>> It may be useful for backups taken with the "consistent snapshot"
>>> approach. As noted in the documentation [0], running CHECKPOINT
>>> before taking the snapshot can reduce recovery time. However, users
>>> might wish to avoid the IO spike caused by an immediate checkpoint.
>>>
>>> [0] https://www.postgresql.org/docs/devel/backup-file.html
>>
>> Ah, understood. I agree that the slow or spread manual checkpoint is good to have.
>
> I can see the use case for IMMEDIATE, but I fail to see the use cases
> for WAIT and FORCE. CHECKPOINT_FORCE is internally implied for the
> end-of-recovery and shutdown checkpoints. WAIT could be a dangerous
> thing if disabled, as clients could pile up requests to the
> checkpointer for no real purpose.

We may want to disable WAIT (or specify wait timeout?) when doing
checkpoint with IMMEDIATE disabled, to avoid long-running command.
OTOH, if we support WAIT disabled, I'd like to have the feature to see
whether the checkpoint has been completed or not. We can do that
by using log_checkpoints, but that's not convenient.

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2020-11-25 05:45:38 Re: Remove cache_plan argument comments to ri_PlanCheck
Previous Message Andy Fan 2020-11-25 05:24:14 Re: [doc] plan invalidation when statistics are update