citusdata / citusdata/citus

Reindex options work only when a single flag is set

Open
#5,214 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

https://github.com/citusdata/citus/blob/d50830d4cc939368b36af0b6fac9da1d4b2f408b/src/backend/distributed/deparser/citus_ruleutils.c#L757

There can be two options before PG14:

#define REINDEXOPT_VERBOSE (1 << 0) /* print progress info */
#define REINDEXOPT_REPORT_PROGRESS (1 << 1) /* report pgstat progress */

When both of them are set, this will fail. The fix is to use `&` instead of `==`.

A commit for this is added with pg14 PR but we should add tests to close this issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.