[PATCH] Use DatumGetUInt32() for dsm_attach() in test_shm_mq_main()
Jianghua Yang <yjhjstz@gmail.com>
From: Jianghua Yang <yjhjstz@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Date: 2025-06-26T19:51:10Z
Lists: pgsql-hackers
Attachments
- 0001-Fix-type-mismatch-in-dsm_attach-argument-by-using-Da.patch (application/octet-stream) patch 0001
Hi, The attached patch fixes a minor type mismatch in `test_shm_mq_main()`. The argument passed to `dsm_attach()` is expected to be a `uint32`, but the code currently uses `DatumGetInt32()` to extract it from the `Datum` argument. This can lead to incorrect behavior when the high bit is set, as 'unable to map dynamic shared memory segment'. This patch changes it to use `DatumGetUInt32()` to match the expected type and ensure correctness. Thanks, Jianghua Yang
Commits
-
Use correct DatumGet*() function in test_shm_mq_main().
- e2f06282124b 14.19 landed
- bf377c21a64a 13.22 landed
- bbccf7ecb363 18.0 landed
- 4dc48ad28d96 15.14 landed
- 07402e370e5b 17.6 landed
- 01f26f5c2e45 16.10 landed