Skip to content

Fix Oid display errors in the log or message#1583

Merged
avamingli merged 1 commit intoapache:mainfrom
fairyfar:main_oid
Mar 5, 2026
Merged

Fix Oid display errors in the log or message#1583
avamingli merged 1 commit intoapache:mainfrom
fairyfar:main_oid

Conversation

@fairyfar
Copy link
Contributor

Fix Oid display errors in the log or message

What does this PR do?

Oid is unsigned int. Therefore, when the Oid reaches 2^31, printing it with %d will display a negative value.

Although it does not affect the feature,but in certain circumstances, deformedlog messages may occur.

This is a defect of the original GPDB. GPDB has fixed similar defects on commit 7279a1e('Fix getResUsage integer overflow'), but there are still omissions.

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


Oid is unsigned int. Therefore, when the Oid reaches 2^31, printing it with %d will display a negative value.
This is a defect of the original GPDB. GPDB has fixed similar defects on commit 7279a1e('Fix getResUsage integer overflow'), but there are still omissions.
Copy link
Contributor

@avamingli avamingli left a comment

Choose a reason for hiding this comment

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

Good catch. LGTM.

@avamingli avamingli merged commit 38cd645 into apache:main Mar 5, 2026
41 checks passed
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