Content-Length: 269063 | pFad | http://github.com/postgrespro/postgres_cluster/commit/a171f01501e11a2ef65d437ac2397a0050892d88

6E Pass DSA_ALLOC_HUGE when allocating a shared TIDBitmap. · postgrespro/postgres_cluster@a171f01 · GitHub
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

Lines changed: 4 additions & 2 deletions
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/a171f01501e11a2ef65d437ac2397a0050892d88

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy