From: Heikki Linnakangas Date: Tue, 13 Feb 2024 19:23:41 +0000 (+0200) Subject: Fix 'mmap' DSM implementation with allocations larger than 4 GB X-Git-Tag: REL_13_15~65 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e923756925d37ac2dae0b353c12b1f31a6898824;p=thirdparty%2Fpostgresql.git Fix 'mmap' DSM implementation with allocations larger than 4 GB Fixes bug #18341. Backpatch to all supported versions. Discussion: https://www.postgresql.org/message-id/18341-ce16599e7fd6228c@postgresql.org --- diff --git a/src/backend/storage/ipc/dsm_impl.c b/src/backend/storage/ipc/dsm_impl.c index 3f9fe01cbf3..f7789b0fe88 100644 --- a/src/backend/storage/ipc/dsm_impl.c +++ b/src/backend/storage/ipc/dsm_impl.c @@ -877,7 +877,7 @@ dsm_impl_mmap(dsm_op op, dsm_handle handle, Size request_size, * transferring data to the kernel. */ char *zbuffer = (char *) palloc0(ZBUFFER_SIZE); - uint32 remaining = request_size; + Size remaining = request_size; bool success = true; /*