Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass relation Oid to smgr_AORelOpenSegFile. #956

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

reshke
Copy link
Contributor

@reshke reshke commented Feb 22, 2025

smgr_* Functions, including smgr_AORelOpenSegFile, were added to CDBD in order to support compute/storage separation solutions, optimized for append load (in few words, for https://github.com/yezzey-gp/yezzey to work). Yezzey uses current segment file relation OIDs in its internal logic. It is not necessary to pass OID each time we call smgr_AORelOpenSegFile, because extension can perform syscahe lookup.

A ratio for this change is to save few CPU cycles where possible.

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


@my-ship-it my-ship-it requested a review from yjhjstz February 25, 2025 06:12
@@ -104,13 +104,18 @@ static f_smgr smgrsw[SMGR_MAX_ID + 1] = {
}
};

static File AORelOpenSegFile(__attribute__((unused))Oid reloid, const char *filePath, int fileFlags)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we doing this, but oid is not used here? Is it because we replace the function pointer in the extension?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because we cannot assing PathNameOpenFile to smgr_AORelOpenSegFile now, signature is changed.
Screenshot 2025-02-25 at 12 23 11

@reshke reshke force-pushed the pass_ooid_to_aorelopenfile branch 2 times, most recently from 8131cdb to 35d4150 Compare February 25, 2025 15:21
@reshke reshke force-pushed the pass_ooid_to_aorelopenfile branch from 35d4150 to 3363508 Compare February 25, 2025 16:35
@reshke reshke requested a review from my-ship-it February 27, 2025 06:14
@reshke
Copy link
Contributor Author

reshke commented Feb 28, 2025

@my-ship-it hi! How do you like this version?

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.

3 participants