0001-Support-allocating-memory-for-large-strings.patch
application/octet-stream
Filename: 0001-Support-allocating-memory-for-large-strings.patch
Type: application/octet-stream
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch 0001
Subject: Support allocating memory for large strings
| File | + | − |
|---|---|---|
| src/backend/access/common/heaptuple.c | 1 | 1 |
From 354473fe17fab22399f6ce48c53e13839a3823cb Mon Sep 17 00:00:00 2001 From: Maxim Zibitsker <max.zibitsker@gmail.com> Date: Thu, 30 Oct 2025 11:00:38 -0400 Subject: [PATCH] Support allocating memory for large strings --- src/backend/access/common/heaptuple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/access/common/heaptuple.c b/src/backend/access/common/heaptuple.c index 1173a6d81b5..e615fa9790a 100644 --- a/src/backend/access/common/heaptuple.c +++ b/src/backend/access/common/heaptuple.c @@ -1163,7 +1163,7 @@ heap_form_tuple(TupleDesc tupleDescriptor, * Allocate and zero the space needed. Note that the tuple body and * HeapTupleData management structure are allocated in one chunk. */ - tuple = (HeapTuple) palloc0(HEAPTUPLESIZE + len); + tuple = (HeapTuple) palloc_extended(HEAPTUPLESIZE + len, MCXT_ALLOC_HUGE | MCXT_ALLOC_ZERO); tuple->t_data = td = (HeapTupleHeader) ((char *) tuple + HEAPTUPLESIZE); /* -- 2.32.1 (Apple Git-133)