-
Notifications
You must be signed in to change notification settings - Fork 157
chore: compile postgres statically to reduce the PLT function call #1064
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
Open
gongxun0928
wants to merge
1
commit into
apache:main
Choose a base branch
from
gongxun0928:chore/build-postgres-in-static-and-build-libpostgres.so-for-other-extension-which-write-unittests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+33
−15
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8ff9d04
to
097d18c
Compare
my-ship-it
approved these changes
Apr 28, 2025
097d18c
to
42e6c83
Compare
42e6c83
to
e47a61a
Compare
avamingli
approved these changes
May 12, 2025
gfphoenix78
reviewed
May 12, 2025
gfphoenix78
reviewed
May 12, 2025
dc0a421
to
f57317e
Compare
gfphoenix78
reviewed
May 20, 2025
gfphoenix78
reviewed
May 20, 2025
1df9a1d
to
03b5cf8
Compare
During TPC-DS testing, we observed that compiling postgres with libpostgres.so introduces PTL function call overhead for some functions. By linking object files (*.o) directly instead, we achieved a 5-8% performance improvement in the TPC-DS 1TB benchmark. This commit modifies the postgres linking process to directly link with the object files rather than the shared library. Additionally, this update fixes a minor bug: the pax extension has a dependency on libpostgres.so. Now, when enabling the pax entension, we check that enable_shared_postgres_backend is set to 'yes' to ensure proper functionality.
03b5cf8
to
e1244e6
Compare
Can wait for #1081 to be merged. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When building postgres, link all the *.o files directly into the binary instead of linking libpostgres.so.
This approach reduces the overhead of PLT function calls. Based on our internal performance tests,
this change improves the performance of a 1TB TPC-DS benchmark by 5-8%.
Fixes #ISSUE_Number
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheck
make -C src/test installcheck-cbdb-parallel
Impact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions