Fix: tde encrypt buffer context don't use share memory#1424
Merged
my-ship-it merged 1 commit intoapache:mainfrom Nov 19, 2025
Merged
Fix: tde encrypt buffer context don't use share memory#1424my-ship-it merged 1 commit intoapache:mainfrom
my-ship-it merged 1 commit intoapache:mainfrom
Conversation
my-ship-it
reviewed
Oct 31, 2025
d3b0505 to
e3dc509
Compare
gfphoenix78
reviewed
Nov 10, 2025
e3dc509 to
05f51f5
Compare
05f51f5 to
1adeb28
Compare
gfphoenix78
reviewed
Nov 12, 2025
1adeb28 to
90c3dd1
Compare
90c3dd1 to
a68d985
Compare
769f782 to
4c1e083
Compare
my-ship-it
approved these changes
Nov 18, 2025
Now we Fix: tde encrypt buffer context don't use share memory We did not calculate the size of shared memory for BufEncCtx and BufDecCtx in the CreateSharedMemoryAndMemories function, which is a potential issue. There is actually no need to use shared memory here, as the parent process does not read the values of BufEncCtx and BufDecCtx. When we use AES algorithm the BufEncCtx and BufDecCtx also does not use shared memory. In order to maintain a consistent code style,we use malloc. cann't use palloc to apply for memory here, as TopmemoryContext is NULL during initialization and the memoryContext has not been setted yet.
4c1e083 to
99b8cb0
Compare
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
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.
Now we Fix: tde encrypt buffer context don't use share memory
We did not calculate the size of shared memory for BufEncCtx and BufDecCtx in the CreateSharedMemoryAndMemories function, which is a potential issue. There is actually no need to use shared memory here, as the parent process does not read the values of BufEncCtx and BufDecCtx. When we use AES algorithm the BufEncCtx and BufDecCtx also does not use shared memory. In order to maintain a consistent code style,we use malloc. cann't use palloc to apply for memory here, as TopmemoryContext is NULL during initialization and the memoryContext has not been setted yet.
Fixes #ISSUE_Number
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions