From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org> |
Cc: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql: Improve accounting for memory used by shared hash tables |
Date: | 2025-04-03 22:57:24 |
Message-ID: | CAApHDvriCiNkm=v521AP6PKPfyWkJ++jqZ9eqX4cXnhxLv8w-A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Thu, 3 Apr 2025 at 04:16, Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org> wrote:
> Improve accounting for memory used by shared hash tables
I've not looked into why, but this is causing an issue in the
join_rel_hash during add_join_rel(). See the attached script.
ERROR: pfree called with invalid pointer 0x60a15edc44e0 (header
0x0000002000000008)
bisecting found this commit.
#0 BogusFree (pointer=0x5b36cd85a5e8) at ../src/backend/utils/mmgr/mcxt.c:288
__func__ = "BogusFree"
#1 0x00005b36c3d70e74 in dir_realloc (hashp=0x5b36cd4c0aa0) at
../src/backend/utils/hash/dynahash.c:1787
new_dirsize = <optimized out>
p = 0x5b36cd4c0b30
old_p = 0x5b36cd85a5e8
new_dsize = <optimized out>
old_dirsize = <optimized out>
p = <optimized out>
old_p = <optimized out>
new_dsize = <optimized out>
old_dirsize = <optimized out>
new_dirsize = <optimized out>
_vstart = <optimized out>
_val = <optimized out>
_len = <optimized out>
_start = <optimized out>
_stop = <optimized out>
#2 expand_table (hashp=0x5b36cd4c0aa0) at
../src/backend/utils/hash/dynahash.c:1691
hctl = 0x5b36cd85a298
old_bucket = <optimized out>
newlink = <optimized out>
nextElement = <optimized out>
old_seg = <optimized out>
new_bucket = 65536
new_segnum = 256
new_segndx = 0
currElement = <optimized out>
new_seg = <optimized out>
old_segnum = <optimized out>
old_segndx = <optimized out>
oldlink = <optimized out>
hctl = <optimized out>
old_seg = <optimized out>
new_seg = <optimized out>
old_bucket = <optimized out>
new_bucket = <optimized out>
new_segnum = <optimized out>
new_segndx = <optimized out>
old_segnum = <optimized out>
old_segndx = <optimized out>
oldlink = <optimized out>
newlink = <optimized out>
currElement = <optimized out>
nextElement = <optimized out>
#3 hash_search_with_hash_value (hashp=0x5b36cd4c0aa0,
keyPtr=0x5b3716ccc6f0, hashvalue=2952019273, action=<optimized out>,
foundPtr=<optimized out>) at ../src/backend/utils/hash/dynahash.c:1112
hctl = 0x5b36cd85a298
freelist_idx = 0
keysize = <optimized out>
currBucket = <optimized out>
prevBucketPtr = <optimized out>
match = <optimized out>
__func__ = "hash_search_with_hash_value"
#4 0x00005b36c3d71031 in hash_search (hashp=<optimized out>,
keyPtr=<optimized out>, action=<optimized out>, foundPtr=<optimized
out>) at ../src/backend/utils/hash/dynahash.c:1069
No locals.
#5 0x00005b36c3b195b3 in add_join_rel (root=0x5b36cd420d28,
joinrel=0x5b3716ccc6e8) at ../src/backend/optimizer/util/relnode.c:638
hentry = <optimized out>
found = false
David
Attachment | Content-Type | Size |
---|---|---|
membug.sql | application/octet-stream | 53.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2025-04-03 23:43:24 | Re: pgsql: Improve accounting for memory used by shared hash tables |
Previous Message | Melanie Plageman | 2025-04-03 22:24:49 | pgsql: Use AIO batchmode for bitmap heap scans |