Skip to content

Conversation

blathers-crl[bot]
Copy link

@blathers-crl blathers-crl bot commented Oct 8, 2025

Backport 1/1 commits from #154789 on behalf of @mgartner.


This commit fixes a bug that was caused by incorrectly modifying the set
and list of target columns when re-projecting computed columns after
building a BEFORE trigger.

Fixes #154672

Release note (bug fix): A bug has been fixed that caused internal errors
for INSERT .. ON CONFLICT .. DO UPDATE statements when the target
table had both a computed column and a BEFORE trigger. This bug has
been present since triggers were introduced in v24.3.0.


Release justification: Low-risk bug fix.

This commit fixes a bug that was caused by incorrectly modifying the set
and list of target columns when re-projecting computed columns after
building a `BEFORE` trigger.

Fixes #154672

Release note (bug fix): A bug has been fixed that caused internal errors
for `INSERT .. ON CONFLICT .. DO UPDATE` statements when the target
table had both a computed column and a `BEFORE` trigger. This bug has
been present since triggers were introduced in v24.3.0.
@blathers-crl blathers-crl bot requested a review from a team as a code owner October 8, 2025 17:55
@blathers-crl blathers-crl bot force-pushed the blathers/backport-release-25.2-154789 branch from 68d8829 to 05931db Compare October 8, 2025 17:55
@blathers-crl blathers-crl bot removed the request for review from a team October 8, 2025 17:55
@blathers-crl blathers-crl bot added the blathers-backport This is a backport that Blathers created automatically. label Oct 8, 2025
@blathers-crl blathers-crl bot requested a review from mw5h October 8, 2025 17:55
@blathers-crl blathers-crl bot added the O-robot Originated from a bot. label Oct 8, 2025
Copy link
Author

blathers-crl bot commented Oct 8, 2025

Thanks for opening a backport.

Before merging, please confirm that it falls into one of the following categories (select one):

  • Non-production code changes. Includes test-only changes, build system changes, etc.
  • Fixes for serious issues. Defined in the policy as correctness, stability, or security issues, data corruption/loss, significant performance regressions, breaking working and widely used functionality, or an inability to detect and debug production issues.
  • Other approved changes. These changes must be gated behind a disabled-by-default feature flag unless there is a strong justification not to.

Add a brief release justification to the PR description explaining your selection.

Also, confirm that the change does not break backward compatibility and complies with all aspects of the backport policy.

All backports must be reviewed by the TL and EM for the owning area.

@blathers-crl blathers-crl bot requested review from DrewKimball and mgartner October 8, 2025 17:55
@blathers-crl blathers-crl bot added backport Label PR's that are backports to older release branches T-sql-queries SQL Queries Team labels Oct 8, 2025
Copy link
Author

blathers-crl bot commented Oct 8, 2025

❌ PR #155075 does not comply with backport policy

Confidence: high
Explanation: The PR details indicate that this change is a bug fix addressing an issue with internal errors when certain conditions involving triggers and computed columns are met in INSERT statements. Specifically, these errors occur with the combination of computed columns and BEFORE triggers. The mention of fixing an error that previously allowed incorrect execution paths suggests the bug might be critical. However, there is no explicit statement affirming it as a critical bug under the specified criteria of stability, security, data corruption/loss, significant performance regressions, incorrect results/suboptimal performance, or debugging capabilities. Without a complete Release justification provided in the PR body or a critical bug categorization under the listed policy criteria, the backport does not comply. Also, there is no indication of feature flag implementation for this change.
Recommendation: Add a justification as to why this is a critical bug fix that can be safely backported without a feature flag or consider gating the change behind a feature flag.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@mgartner mgartner requested review from michae2 and removed request for mgartner October 8, 2025 20:07
@mgartner mgartner merged commit 56844a5 into release-25.2 Oct 14, 2025
15 of 16 checks passed
@mgartner mgartner deleted the blathers/backport-release-25.2-154789 branch October 14, 2025 14:26
KeithCh pushed a commit that referenced this pull request Oct 14, 2025
…-25.2-154789

release-25.2: opt: fix trigger+computed column internal error
KeithCh pushed a commit that referenced this pull request Oct 14, 2025
…-25.2-154789

release-25.2: opt: fix trigger+computed column internal error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Label PR's that are backports to older release branches blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. T-sql-queries SQL Queries Team target-release-25.2.8

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants