pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix rare sharedtuplestore.c corruption. 6+ messages / 1 participants [nested] [flat]
* pgsql: Fix rare sharedtuplestore.c corruption. @ 2023-01-26 02:30 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Thomas Munro @ 2023-01-26 02:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix rare sharedtuplestore.c corruption. If the final chunk of an oversized tuple being written out to disk was exactly 32760 bytes, it would be corrupted due to a fencepost bug. Bug #17619. Back-patch to 11 where the code arrived. While testing that (see test module in archives), I (tmunro) noticed that the per-participant page counter was not initialized to zero as it should have been; that wasn't a live bug when it was written since DSM memory was originally always zeroed, but since 14 min_dynamic_shared_memory might be configured and it supplies non-zeroed memory, so that is also fixed here. Author: Dmitry Astapov <dastapov@gmail.com> Discussion: https://postgr.es/m/17619-0de62ceda812b8b5%40postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/ffcf6f4cfca5a4ce2ac7ff7e8fa17541a5a9caea Modified Files -------------- src/backend/utils/sort/sharedtuplestore.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix rare sharedtuplestore.c corruption. @ 2023-01-26 02:30 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Thomas Munro @ 2023-01-26 02:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix rare sharedtuplestore.c corruption. If the final chunk of an oversized tuple being written out to disk was exactly 32760 bytes, it would be corrupted due to a fencepost bug. Bug #17619. Back-patch to 11 where the code arrived. While testing that (see test module in archives), I (tmunro) noticed that the per-participant page counter was not initialized to zero as it should have been; that wasn't a live bug when it was written since DSM memory was originally always zeroed, but since 14 min_dynamic_shared_memory might be configured and it supplies non-zeroed memory, so that is also fixed here. Author: Dmitry Astapov <dastapov@gmail.com> Discussion: https://postgr.es/m/17619-0de62ceda812b8b5%40postgresql.org Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d9f5345bf90799a992995d935b712e5040830732 Modified Files -------------- src/backend/utils/sort/sharedtuplestore.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix rare sharedtuplestore.c corruption. @ 2023-01-26 02:30 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Thomas Munro @ 2023-01-26 02:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix rare sharedtuplestore.c corruption. If the final chunk of an oversized tuple being written out to disk was exactly 32760 bytes, it would be corrupted due to a fencepost bug. Bug #17619. Back-patch to 11 where the code arrived. While testing that (see test module in archives), I (tmunro) noticed that the per-participant page counter was not initialized to zero as it should have been; that wasn't a live bug when it was written since DSM memory was originally always zeroed, but since 14 min_dynamic_shared_memory might be configured and it supplies non-zeroed memory, so that is also fixed here. Author: Dmitry Astapov <dastapov@gmail.com> Discussion: https://postgr.es/m/17619-0de62ceda812b8b5%40postgresql.org Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2f65b84683b7e755b4c44dc949f567e6d5d50132 Modified Files -------------- src/backend/utils/sort/sharedtuplestore.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix rare sharedtuplestore.c corruption. @ 2023-01-26 02:31 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Thomas Munro @ 2023-01-26 02:31 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix rare sharedtuplestore.c corruption. If the final chunk of an oversized tuple being written out to disk was exactly 32760 bytes, it would be corrupted due to a fencepost bug. Bug #17619. Back-patch to 11 where the code arrived. While testing that (see test module in archives), I (tmunro) noticed that the per-participant page counter was not initialized to zero as it should have been; that wasn't a live bug when it was written since DSM memory was originally always zeroed, but since 14 min_dynamic_shared_memory might be configured and it supplies non-zeroed memory, so that is also fixed here. Author: Dmitry Astapov <dastapov@gmail.com> Discussion: https://postgr.es/m/17619-0de62ceda812b8b5%40postgresql.org Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/1a5afe007779b677c4f2e411f8d9af23f7a2d085 Modified Files -------------- src/backend/utils/sort/sharedtuplestore.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix rare sharedtuplestore.c corruption. @ 2023-01-26 02:31 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Thomas Munro @ 2023-01-26 02:31 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix rare sharedtuplestore.c corruption. If the final chunk of an oversized tuple being written out to disk was exactly 32760 bytes, it would be corrupted due to a fencepost bug. Bug #17619. Back-patch to 11 where the code arrived. While testing that (see test module in archives), I (tmunro) noticed that the per-participant page counter was not initialized to zero as it should have been; that wasn't a live bug when it was written since DSM memory was originally always zeroed, but since 14 min_dynamic_shared_memory might be configured and it supplies non-zeroed memory, so that is also fixed here. Author: Dmitry Astapov <dastapov@gmail.com> Discussion: https://postgr.es/m/17619-0de62ceda812b8b5%40postgresql.org Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b55303792afe9e4008815bfd87a51758f5736854 Modified Files -------------- src/backend/utils/sort/sharedtuplestore.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix rare sharedtuplestore.c corruption. @ 2023-01-26 02:31 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Thomas Munro @ 2023-01-26 02:31 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix rare sharedtuplestore.c corruption. If the final chunk of an oversized tuple being written out to disk was exactly 32760 bytes, it would be corrupted due to a fencepost bug. Bug #17619. Back-patch to 11 where the code arrived. While testing that (see test module in archives), I (tmunro) noticed that the per-participant page counter was not initialized to zero as it should have been; that wasn't a live bug when it was written since DSM memory was originally always zeroed, but since 14 min_dynamic_shared_memory might be configured and it supplies non-zeroed memory, so that is also fixed here. Author: Dmitry Astapov <dastapov@gmail.com> Discussion: https://postgr.es/m/17619-0de62ceda812b8b5%40postgresql.org Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d95dcc9ab5f8816c7a4ac591628c68efaa2a9b7a Modified Files -------------- src/backend/utils/sort/sharedtuplestore.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2023-01-26 02:31 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-01-26 02:30 pgsql: Fix rare sharedtuplestore.c corruption. Thomas Munro <tmunro@postgresql.org> 2023-01-26 02:30 pgsql: Fix rare sharedtuplestore.c corruption. Thomas Munro <tmunro@postgresql.org> 2023-01-26 02:30 pgsql: Fix rare sharedtuplestore.c corruption. Thomas Munro <tmunro@postgresql.org> 2023-01-26 02:31 pgsql: Fix rare sharedtuplestore.c corruption. Thomas Munro <tmunro@postgresql.org> 2023-01-26 02:31 pgsql: Fix rare sharedtuplestore.c corruption. Thomas Munro <tmunro@postgresql.org> 2023-01-26 02:31 pgsql: Fix rare sharedtuplestore.c corruption. 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