summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNathan Bossart2025-07-11 16:51:25 +0000
committerNathan Bossart2025-07-11 16:51:25 +0000
commita4f126516e688736bfed332b44a0c221b8dc118a (patch)
treeb921beb43ae0acd7a8ce510896e2c6d1b06fd831 /src/test
parentbb938e2c3c7a955090f8b68b5bf75d064f6a36a0 (diff)
Add option list to CHECKPOINT command.
This commit adds the boilerplate code for supporting a list of options in CHECKPOINT commands. No actual options are supported yet, but follow-up commits will add support for MODE and FLUSH_UNLOGGED. While at it, this commit refactors the code for executing CHECKPOINT commands to its own function since it's about to become significantly larger. Author: Christoph Berg <myon@debian.org> Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com> Discussion: https://postgr.es/m/aDnaKTEf-0dLiEfz%40msg.df7cb.de
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/stats.out6
-rw-r--r--src/test/regress/sql/stats.sql3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/test/regress/expected/stats.out b/src/test/regress/expected/stats.out
index 776f1ad0e53..9b865ae5f6c 100644
--- a/src/test/regress/expected/stats.out
+++ b/src/test/regress/expected/stats.out
@@ -926,6 +926,12 @@ DROP TABLE test_stats_temp;
-- Checkpoint twice: The checkpointer reports stats after reporting completion
-- of the checkpoint. But after a second checkpoint we'll see at least the
-- results of the first.
+--
+-- While at it, test checkpoint options.
+CHECKPOINT (WRONG);
+ERROR: unrecognized CHECKPOINT option "wrong"
+LINE 1: CHECKPOINT (WRONG);
+ ^
CHECKPOINT;
CHECKPOINT;
SELECT num_requested > :rqst_ckpts_before FROM pg_stat_checkpointer;
diff --git a/src/test/regress/sql/stats.sql b/src/test/regress/sql/stats.sql
index 232ab8db8fa..97b50926aa6 100644
--- a/src/test/regress/sql/stats.sql
+++ b/src/test/regress/sql/stats.sql
@@ -439,6 +439,9 @@ DROP TABLE test_stats_temp;
-- Checkpoint twice: The checkpointer reports stats after reporting completion
-- of the checkpoint. But after a second checkpoint we'll see at least the
-- results of the first.
+--
+-- While at it, test checkpoint options.
+CHECKPOINT (WRONG);
CHECKPOINT;
CHECKPOINT;