pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix min_dynamic_shared_memory on Windows. 4+ messages / 1 participants [nested] [flat]
* pgsql: Fix min_dynamic_shared_memory on Windows. @ 2023-10-21 21:26 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Thomas Munro @ 2023-10-21 21:26 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix min_dynamic_shared_memory on Windows. When min_dynamic_shared_memory is set above 0, we try to find space in a pre-allocated region of the main shared memory area instead of calling dsm_impl_XXX() routines to allocate more. The dsm_pin_segment() and dsm_unpin_segment() routines had a bug: they called dsm_impl_XXX() routines even for main region segments. Nobody noticed before now because those routines do nothing on Unix, but on Windows they'd fail while attempting to duplicate an invalid Windows HANDLE. Add the missing gating. Back-patch to 14, where commit 84b1c63a added this feature. Fixes pgsql-bugs bug #18165. Reported-by: Maxime Boyer <maxime.boyer@cra-arc.gc.ca> Tested-by: Alexander Lakhin <exclusion@gmail.com> Discussion: https://postgr.es/m/18165-bf4f525cea6e51de%40postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/dab889d60bac3fbf691973ca1770f2eb50547999 Modified Files -------------- src/backend/storage/ipc/dsm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix min_dynamic_shared_memory on Windows. @ 2023-10-21 21:27 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Thomas Munro @ 2023-10-21 21:27 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix min_dynamic_shared_memory on Windows. When min_dynamic_shared_memory is set above 0, we try to find space in a pre-allocated region of the main shared memory area instead of calling dsm_impl_XXX() routines to allocate more. The dsm_pin_segment() and dsm_unpin_segment() routines had a bug: they called dsm_impl_XXX() routines even for main region segments. Nobody noticed before now because those routines do nothing on Unix, but on Windows they'd fail while attempting to duplicate an invalid Windows HANDLE. Add the missing gating. Back-patch to 14, where commit 84b1c63a added this feature. Fixes pgsql-bugs bug #18165. Reported-by: Maxime Boyer <maxime.boyer@cra-arc.gc.ca> Tested-by: Alexander Lakhin <exclusion@gmail.com> Discussion: https://postgr.es/m/18165-bf4f525cea6e51de%40postgresql.org Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/174ccda5e2874fe33cc29b29dae753c1403288e3 Modified Files -------------- src/backend/storage/ipc/dsm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix min_dynamic_shared_memory on Windows. @ 2023-10-21 21:27 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Thomas Munro @ 2023-10-21 21:27 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix min_dynamic_shared_memory on Windows. When min_dynamic_shared_memory is set above 0, we try to find space in a pre-allocated region of the main shared memory area instead of calling dsm_impl_XXX() routines to allocate more. The dsm_pin_segment() and dsm_unpin_segment() routines had a bug: they called dsm_impl_XXX() routines even for main region segments. Nobody noticed before now because those routines do nothing on Unix, but on Windows they'd fail while attempting to duplicate an invalid Windows HANDLE. Add the missing gating. Back-patch to 14, where commit 84b1c63a added this feature. Fixes pgsql-bugs bug #18165. Reported-by: Maxime Boyer <maxime.boyer@cra-arc.gc.ca> Tested-by: Alexander Lakhin <exclusion@gmail.com> Discussion: https://postgr.es/m/18165-bf4f525cea6e51de%40postgresql.org Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f72790b2952d75c885cf812b38d59d1586bf039e Modified Files -------------- src/backend/storage/ipc/dsm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix min_dynamic_shared_memory on Windows. @ 2023-10-21 21:27 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Thomas Munro @ 2023-10-21 21:27 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix min_dynamic_shared_memory on Windows. When min_dynamic_shared_memory is set above 0, we try to find space in a pre-allocated region of the main shared memory area instead of calling dsm_impl_XXX() routines to allocate more. The dsm_pin_segment() and dsm_unpin_segment() routines had a bug: they called dsm_impl_XXX() routines even for main region segments. Nobody noticed before now because those routines do nothing on Unix, but on Windows they'd fail while attempting to duplicate an invalid Windows HANDLE. Add the missing gating. Back-patch to 14, where commit 84b1c63a added this feature. Fixes pgsql-bugs bug #18165. Reported-by: Maxime Boyer <maxime.boyer@cra-arc.gc.ca> Tested-by: Alexander Lakhin <exclusion@gmail.com> Discussion: https://postgr.es/m/18165-bf4f525cea6e51de%40postgresql.org Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/fb9a16a1a6f24f5bbf05ca7a49bd4305575cc2f2 Modified Files -------------- src/backend/storage/ipc/dsm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2023-10-21 21:27 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-10-21 21:26 pgsql: Fix min_dynamic_shared_memory on Windows. Thomas Munro <tmunro@postgresql.org> 2023-10-21 21:27 pgsql: Fix min_dynamic_shared_memory on Windows. Thomas Munro <tmunro@postgresql.org> 2023-10-21 21:27 pgsql: Fix min_dynamic_shared_memory on Windows. Thomas Munro <tmunro@postgresql.org> 2023-10-21 21:27 pgsql: Fix min_dynamic_shared_memory on Windows. Thomas Munro <tmunro@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox