Repository navigation
Conversation
Allocate attencoding for the current table's columns. Sizing it by the full attribute result for each table can exhaust memory during schema-only dumps. Restore the pg_attribute_encoding join lost in the PostgreSQL 16 merge and read each encoding from the matching result row. Add a TAP case that dumps two AOCO tables with different compression levels. Refs apache#2330
There was a problem hiding this comment.
Hi, @doefimov welcome!🎊 Thanks for taking the effort to make our project better! 🙌 Keep making such awesome contributions!
Member
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.
Refs #2330
What does this PR do?
getTableAttrs()allocates an encoding array for each table based on the total number of attributes in the query result. Size the array to the current table's column count to avoid exhausting memory during schema-only dumps.Restore the
pg_attribute_encodingjoin lost in the PostgreSQL 16 merge and read each encoding from the matching result row.Type of Change
Test Plan
The new TAP case dumps two AOCO tables together and checks that the second table retains its own compression level. It fails before the patch and passes after it.
With 600 tables of 100 columns each and a 192 MiB client address-space limit,
pg_dump -sandpg_dumpall -sran out of memory before the patch and succeeded after it.The same existing failures reproduced on unpatched and patched
mainin002_pg_dump.pl,004_pg_dump_parallel.pl, and011_restore.pl.Checklist
Additional Context
REL_2_STABLEalready has the catalog join. Only the allocation and row-index fixes need to be backported.