]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix 'mmap' DSM implementation with allocations larger than 4 GB
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 13 Feb 2024 19:23:41 +0000 (21:23 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 13 Feb 2024 19:25:27 +0000 (21:25 +0200)
Fixes bug #18341. Backpatch to all supported versions.

Discussion: https://www.postgresql.org/message-id/18341-ce16599e7fd6228c@postgresql.org

src/backend/storage/ipc/dsm_impl.c

index 340048a0d1e1b0a156e09d076268d5e5c90e534d..77a195b4836daf8797b66f6a3c910c20ed22a7dd 100644 (file)
@@ -880,7 +880,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;
 
                /*