On 2025/06/06 19:03, Christoph Berg wrote:
Re: Andres Freund
I'd add a 'mode' that can be set to an arbitrary string, which then can be
validated in C code. That seems more future proof.
Changed in the attached v2, thanks.
When I applied the patch and compiled it, I got the following warnings:
utility.c:946:4: warning: label followed by a declaration is a C23 extension
[-Wc23-extensions]
946 | CheckPointStmt *stmt = (CheckPointStmt *)
parsetree;
| ^
utility.c:947:16: warning: mixing declarations and code is incompatible with
standards before C99 [-Wdeclaration-after-statement]
947 | ListCell *lc;
| ^
2 warnings generated.
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?
Regards,
--
Fujii Masao
NTT DATA Japan Corporation