From 645a0d12273b34c7c2a20f3187c2a85e3932b943 Mon Sep 17 00:00:00 2001 From: Naisila Puka <37271756+naisila@users.noreply.github.com> Date: Mon, 4 Sep 2023 11:31:57 +0300 Subject: [PATCH] PG16 - Add reindex database/system tests (#7167) In PG16, REINDEX DATABASE/SYSTEM name is optional. We already don't propagate these commands automatically. Testing here with run_command_on_workers. Relevant PG commit: https://github.com/postgres/postgres/commit/2cbc3c1 --- src/test/regress/expected/pg16.out | 22 ++++++++++++++++++++++ src/test/regress/sql/pg16.sql | 13 +++++++++++++ 2 files changed, 35 insertions(+) diff --git a/src/test/regress/expected/pg16.out b/src/test/regress/expected/pg16.out index 39fd5a29b..3d2d51896 100644 --- a/src/test/regress/expected/pg16.out +++ b/src/test/regress/expected/pg16.out @@ -916,6 +916,28 @@ SELECT result FROM run_command_on_workers REINDEX (2 rows) +-- REINDEX DATABASE/SYSTEM name is optional +-- We already don't propagate these commands automatically +-- Testing here with run_command_on_workers +-- Relevant PG commit: https://github.com/postgres/postgres/commit/2cbc3c1 +REINDEX DATABASE; +SELECT result FROM run_command_on_workers +($$REINDEX DATABASE$$); + result +--------------------------------------------------------------------- + REINDEX + REINDEX +(2 rows) + +REINDEX SYSTEM; +SELECT result FROM run_command_on_workers +($$REINDEX SYSTEM$$); + result +--------------------------------------------------------------------- + REINDEX + REINDEX +(2 rows) + -- -- random_normal() to provide normally-distributed random numbers -- adding here the same tests as the ones with random() in aggregate_support.sql diff --git a/src/test/regress/sql/pg16.sql b/src/test/regress/sql/pg16.sql index 4810c636d..30f2731e6 100644 --- a/src/test/regress/sql/pg16.sql +++ b/src/test/regress/sql/pg16.sql @@ -530,6 +530,19 @@ REINDEX SYSTEM; SELECT result FROM run_command_on_workers ($$REINDEX SYSTEM$$); +-- REINDEX DATABASE/SYSTEM name is optional +-- We already don't propagate these commands automatically +-- Testing here with run_command_on_workers +-- Relevant PG commit: https://github.com/postgres/postgres/commit/2cbc3c1 + +REINDEX DATABASE; +SELECT result FROM run_command_on_workers +($$REINDEX DATABASE$$); + +REINDEX SYSTEM; +SELECT result FROM run_command_on_workers +($$REINDEX SYSTEM$$); + -- -- random_normal() to provide normally-distributed random numbers -- adding here the same tests as the ones with random() in aggregate_support.sql