Re: CHECKPOINT unlogged data

From: Christoph Berg <myon(at)debian(dot)org>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: CHECKPOINT unlogged data
Date: 2025-06-06 14:26:56
Message-ID: aEL6sDr9RxdSkPm-@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Re: Fujii Masao
> utility.c:946:4: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]

Thanks, my compiler didn't throw that. { } block added in v3.

> RequestCheckpoint(CHECKPOINT_WAIT |
> + (immediate ? CHECKPOINT_IMMEDIATE : 0) |
> + (flush_all ? CHECKPOINT_FLUSH_ALL : 0) |
>
> Some users might want to trigger a spread checkpoint but not wait for
> it to finish, since it could take a long time? If that's a valid use case,
> maybe we should add a WAIT option to let users choose whether to wait for
> the checkpoint to complete or not?

Do we want that? The checkpoint is only effective when it's finished,
and running `psql -c "checkpoint (wait false)"` might make people
shoot themselves into the foot.

Christoph

Attachment Content-Type Size
v3-0001-Add-mode-and-flush_all-options-to-checkpoint.patch text/x-diff 10.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2025-06-06 15:23:30 Re: [PATCH] Re: Proposal to Enable/Disable Index using ALTER INDEX
Previous Message Bruce Momjian 2025-06-06 14:22:17 Re: Enable data checksums by default