Skip to content
This repository was archived by the owner on Jan 14, 2026. It is now read-only.

ADBDEV-8922: Restore global size limits for table_size_map and quota_info_map#53

Merged
RekGRpth merged 43 commits intogpdbfrom
ADBDEV-8922
Dec 23, 2025
Merged

ADBDEV-8922: Restore global size limits for table_size_map and quota_info_map#53
RekGRpth merged 43 commits intogpdbfrom
ADBDEV-8922

Conversation

@RekGRpth
Copy link
Member

@RekGRpth RekGRpth commented Dec 4, 2025

Restore global size limits for table_size_map and quota_info_map

Commit 2862042 introduced a regression where the shared hash tables
table_size_map and quota_info_map could overflow. Their size was limited for
each database (worker) separately, while memory was requested for them only
once for the entire instance.

Commit 6ebff01 fixed this by requesting memory for each database (worker)
separately. Although this avoided overflow, it significantly increased the
consumption of shared memory.

Restore the original design, in which memory is requested only once for the
entire instance; each database (worker) has its own shared hash maps, but the
number of elements in them is limited by global atomic counters.

There are no tests because it is quite difficult to run out of shared memory
without exceeding the limit for each database.

Ticket: ADBDEV-8922

@RekGRpth RekGRpth changed the title ADBDEV-8922: Restore old logic for limiting sizes of table_size and quota_info_map ADBDEV-8922: Restore the old logic for limiting the sizes of table_size and quota_info_map Dec 10, 2025
@RekGRpth RekGRpth changed the base branch from gpdb to ADBDEV-8953 December 10, 2025 08:03
@RekGRpth RekGRpth changed the base branch from ADBDEV-8953 to gpdb December 10, 2025 08:37
@RekGRpth RekGRpth changed the base branch from gpdb to ADBDEV-8953 December 10, 2025 09:28
Base automatically changed from ADBDEV-8953 to gpdb December 16, 2025 06:24
@RekGRpth RekGRpth marked this pull request as ready for review December 16, 2025 08:28
@RekGRpth RekGRpth changed the title ADBDEV-8922: Restore the old logic for limiting the sizes of table_size and quota_info_map ADBDEV-8922: Restore global size limits for table_size_map and quota_info_map Dec 18, 2025
Copy link

@KnightMurloc KnightMurloc left a comment

Choose a reason for hiding this comment

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

Why can't we make tests for hash map overflow as was done in 2862042?

@RekGRpth
Copy link
Member Author

Why can't we make tests for hash map overflow as was done in 2862042?

This patch doesn't fix any overflows! Furthermore, the tests from that commit also work with this patch!

@RekGRpth RekGRpth merged commit 27f0c5f into gpdb Dec 23, 2025
2 checks passed
@RekGRpth RekGRpth deleted the ADBDEV-8922 branch December 23, 2025 10:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants