[YSQL] YB_AT_REWRITE_ALTER_PRIMARY_KEY clashes with other flags #22086
Labels
area/ysql
Yugabyte SQL (YSQL)
kind/bug
This issue is a bug
priority/medium
Medium priority issue
status/awaiting-triage
Issue awaiting triage
Jira Link: DB-11005
Description
Commit d5d7363 adds YB_AT_REWRITE_ALTER_PRIMARY_KEY in event_trigger.h:
Notice
0x16
is decimal 22, binary 00010110, which conflicts with AT_REWRITE_DEFAULT_VAL and AT_REWRITE_COLUMN_REWRITE. This is used in the code liketab->rewrite |= YB_AT_REWRITE_ALTER_PRIMARY_KEY;
, wheretab->rewrite
isint AlteredTableInfo.rewrite
. I have no specific bug, but it looks like risky code.Furthermore, upstream PG can continue to add more items here, so it is better practice for YB items to go high-to-low to avoid clashing during merge. For example, it could be set to
0x8000
which is comfortably within int boundaries and offers decent space for further fields to come in. See src/postgres/src/include/executor/executor.h EXEC_FLAG_YB_AGG_PARENT for example.Backports may be needed.
Issue Type
kind/bug
Warning: Please confirm that this issue does not contain any sensitive information
The text was updated successfully, but these errors were encountered: