Skip to content

CI: run the TAP tests of the client scripts - #2259

Merged
tuhaihe merged 2 commits into
apache:mainfrom
tuhaihe:ci-scripts
Nov 24, 2026
Merged

tuhaihe merged 2 commits into
apache:mainfrom
tuhaihe:ci-scripts

Conversation

@tuhaihe

@tuhaihe tuhaihe commented Nov 6, 2026

Copy link
Copy Markdown
Member

CI does not run the TAP tests in src/bin/scripts, so nobody sees when createdb, dropdb, clusterdb, reindexdb, vacuumdb and the other client programs break.

Add an ic-scripts test job that runs them on Rocky 8, 9 and 10.

Assisted-by: Claude Code

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


@leborchuk leborchuk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

CI does not run the TAP tests in src/bin/scripts, so nobody sees when
createdb, dropdb, clusterdb, reindexdb, vacuumdb and the other client
programs break.

Add them to the ic-tap job, which runs on Rocky 8, 9 and 10.

Assisted-by: Claude Code
@reshke
reshke enabled auto-merge (rebase) November 24, 2026 09:28
Five test files in src/bin/scripts fail on Cloudberry:

- 011_clusterdb_all, 050_dropdb, 091_reindexdb_all and
  101_vacuumdb_all mark a database as invalid with an UPDATE of
  pg_database.  Cloudberry does not allow DML on a system catalog
  without allow_system_table_mods, so each test stops with "permission
  denied: "pg_database" is a system catalog".  Set the parameter before
  the UPDATE, as 037_invalid_database in src/test/recovery does.
- In 090_reindexdb, PostgreSQL 16 adds --concurrently to the tablespace
  checks and to the parallel database check.  Cloudberry's reindexdb
  refuses --concurrently and fails with "reindexing a database
  concurrently is not supported" (fa79ed6), although the server
  runs REINDEX CONCURRENTLY.  Skip these checks, as the file already
  does for the other --concurrently checks.  The checks
  without --concurrently that run before them still test the same
  tablespace behavior.

Assisted-by: Claude Code
@tuhaihe

tuhaihe commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Hi @reshke @leborchuk, while checking this PR I looked at why the --concurrently checks in 090_reindexdb.pl fail. The problem is in the client only. The server is fine.

  • Server: REINDEX ... CONCURRENTLY works on both main and REL_2_STABLE. indexcmds.c dispatches it to the segments in phases (dispatchReindexConcurrently). On a 3-segment demo cluster, REINDEX INDEX / TABLE / SCHEMA / DATABASE CONCURRENTLY all succeed. The index gets a new relfilenode on the coordinator and on every segment, and it stays valid.
  • Client: reindexdb refuses --concurrently outright, even for a single table (-t), with "reindexing a database concurrently is not supported". This ban comes from GPDB commit fa79ed6 (2023). At that time GPDB had disabled concurrent index builds (e5b0e25), which is no longer the case in Cloudberry.

So this PR keeps skipping those checks. I have only corrected the comments to say that the client refuses the option.

Do you think it is worth lifting the ban in reindexdb? That would mean restoring the upstream server-version check and turning the skipped --concurrently checks back on. Are there known problems with REINDEX CONCURRENTLY in Cloudberry (AO/AOCS tables, partitioned tables, mirrors) that we should check first?

@tuhaihe
tuhaihe disabled auto-merge November 24, 2026 10:33
@tuhaihe
tuhaihe enabled auto-merge (rebase) November 24, 2026 14:34
@tuhaihe
tuhaihe merged commit 38d9aa6 into apache:main Nov 24, 2026
158 checks passed
@reshke

reshke commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Do you think it is worth lifting the ban in reindexdb? That would mean restoring the upstream server-version check and turning the skipped --concurrently checks back on.

Totally

Are there known problems with REINDEX CONCURRENTLY in Cloudberry (AO/AOCS tables, partitioned tables, mirrors) that we should check first?

Not to my knowledge

@reshke

reshke commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Are there known problems with REINDEX CONCURRENTLY in Cloudberry (AO/AOCS tables, partitioned tables, mirrors) that we should check first?

Not to my knowledge

We quite obviously cannot support RIC/CIC for AO cause of second scan which need to tell for each tuple if this tuple was visible at time CIC snap was taken.
#2420

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants