Skip to content

Commit a171f01

Browse files
committed
Pass DSA_ALLOC_HUGE when allocating a shared TIDBitmap.
When creating an unshared TIDBitmap, we pass MCXT_ALLOC_HUGE to allow allocations >1GB, so by analogy we pass DSA_ALLOC_HUGE for a shared TIDBitmap. Bug introduced by commit 98e6e89. Report by Rafia Sabih, fix by Dilip Kumar, adjusted by me. Discussion: http://postgr.es/m/CAOGQiiPpSnkuKq+oUK_bvQFg2EPGFPN8RwgxTgBa6HU_kQa3EA@mail.gmail.com
1 parent facde2a commit a171f01

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/backend/nodes/tidbitmap.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -1533,9 +1533,11 @@ pagetable_allocate(pagetable_hash *pagetable, Size size)
15331533
* new memory so that pagetable_free can free the old entry.
15341534
*/
15351535
tbm->dsapagetableold = tbm->dsapagetable;
1536-
tbm->dsapagetable = dsa_allocate0(tbm->dsa, sizeof(PTEntryArray) + size);
1537-
1536+
tbm->dsapagetable = dsa_allocate_extended(tbm->dsa,
1537+
sizeof(PTEntryArray) + size,
1538+
DSA_ALLOC_HUGE | DSA_ALLOC_ZERO);
15381539
ptbase = dsa_get_address(tbm->dsa, tbm->dsapagetable);
1540+
15391541
return ptbase->ptentry;
15401542
}
15411543

0 commit comments

Comments
 (0)