Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit84dc130

Browse files
Accommodate very large dshash tables.
If a dshash table grows very large (e.g., the dshash table forcumulative statistics when there are millions of tables), resizingit may fail with an error like:ERROR: invalid DSA memory alloc request size 1073741824To fix, permit dshash resizing to allocate more than 1 GB byproviding the DSA_ALLOC_HUGE flag.Reported-by: Andreas ScherbaumAuthor: Matthias van de MeentReviewed-by: Cédric Villemain, Michael Paquier, Andres FreundDiscussion:https://postgr.es/m/80a12d59-0d5e-4c54-866c-e69cd6536471%40pgug.deBackpatch-through: 13
1 parentf5f5e7b commit84dc130

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/backend/lib/dshash.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,8 +692,10 @@ resize(dshash_table *hash_table, size_t new_size_log2)
692692
Assert(new_size_log2==hash_table->control->size_log2+1);
693693

694694
/* Allocate the space for the new table. */
695-
new_buckets_shared=dsa_allocate0(hash_table->area,
696-
sizeof(dsa_pointer)*new_size);
695+
new_buckets_shared=
696+
dsa_allocate_extended(hash_table->area,
697+
sizeof(dsa_pointer)*new_size,
698+
DSA_ALLOC_HUGE |DSA_ALLOC_ZERO);
697699
new_buckets=dsa_get_address(hash_table->area,new_buckets_shared);
698700

699701
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp