cloudberry
cloudberry copied to clipboard
Fix: tde encrypt buffer context don't use share memory
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
- [x] 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
- [ ] Followed contribution guide
- [ ] Added/updated documentation
- [ ] Reviewed code for security implications
- [ ] Requested review from cloudberry committers