pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Properly terminate the array returned by GetLockConflicts(). 6+ messages / 1 participants [nested] [flat]
* pgsql: Properly terminate the array returned by GetLockConflicts(). @ 2015-01-29 22:20 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 6+ messages in thread From: Andres Freund @ 2015-01-29 22:20 UTC (permalink / raw) To: pgsql-committers Properly terminate the array returned by GetLockConflicts(). GetLockConflicts() has for a long time not properly terminated the returned array. During normal processing the returned array is zero initialized which, while not pretty, is sufficient to be recognized as a invalid virtual transaction id. But the HotStandby case is more than aesthetically broken: The allocated (and reused) array is neither zeroed upon allocation, nor reinitialized, nor terminated. Not having a terminating element means that the end of the array will not be recognized and that recovery conflict handling will thus read ahead into adjacent memory. Only terminating when hitting memory content that looks like a invalid virtual transaction id. Luckily this seems so far not have caused significant problems, besides making recovery conflict more expensive. Discussion: 20150127142713.GD29457@awork2.anarazel.de Backpatch into all supported branches. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/17792bfc5b62f42a9dfbd2ac408e7e71c239330a Modified Files -------------- src/backend/storage/lmgr/lock.c | 4 ++++ 1 file changed, 4 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Properly terminate the array returned by GetLockConflicts(). @ 2015-01-29 22:20 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 6+ messages in thread From: Andres Freund @ 2015-01-29 22:20 UTC (permalink / raw) To: pgsql-committers Properly terminate the array returned by GetLockConflicts(). GetLockConflicts() has for a long time not properly terminated the returned array. During normal processing the returned array is zero initialized which, while not pretty, is sufficient to be recognized as a invalid virtual transaction id. But the HotStandby case is more than aesthetically broken: The allocated (and reused) array is neither zeroed upon allocation, nor reinitialized, nor terminated. Not having a terminating element means that the end of the array will not be recognized and that recovery conflict handling will thus read ahead into adjacent memory. Only terminating when hitting memory content that looks like a invalid virtual transaction id. Luckily this seems so far not have caused significant problems, besides making recovery conflict more expensive. Discussion: 20150127142713.GD29457@awork2.anarazel.de Backpatch into all supported branches. Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/76e962750f0b2557e6a356c35d7c66fe8fb263b0 Modified Files -------------- src/backend/storage/lmgr/lock.c | 4 ++++ 1 file changed, 4 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Properly terminate the array returned by GetLockConflicts(). @ 2015-01-29 22:20 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 6+ messages in thread From: Andres Freund @ 2015-01-29 22:20 UTC (permalink / raw) To: pgsql-committers Properly terminate the array returned by GetLockConflicts(). GetLockConflicts() has for a long time not properly terminated the returned array. During normal processing the returned array is zero initialized which, while not pretty, is sufficient to be recognized as a invalid virtual transaction id. But the HotStandby case is more than aesthetically broken: The allocated (and reused) array is neither zeroed upon allocation, nor reinitialized, nor terminated. Not having a terminating element means that the end of the array will not be recognized and that recovery conflict handling will thus read ahead into adjacent memory. Only terminating when hitting memory content that looks like a invalid virtual transaction id. Luckily this seems so far not have caused significant problems, besides making recovery conflict more expensive. Discussion: 20150127142713.GD29457@awork2.anarazel.de Backpatch into all supported branches. Branch ------ REL9_3_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/9be655632bf23fa08bf48ffe672a6be125af8780 Modified Files -------------- src/backend/storage/lmgr/lock.c | 4 ++++ 1 file changed, 4 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Properly terminate the array returned by GetLockConflicts(). @ 2015-01-29 22:20 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 6+ messages in thread From: Andres Freund @ 2015-01-29 22:20 UTC (permalink / raw) To: pgsql-committers Properly terminate the array returned by GetLockConflicts(). GetLockConflicts() has for a long time not properly terminated the returned array. During normal processing the returned array is zero initialized which, while not pretty, is sufficient to be recognized as a invalid virtual transaction id. But the HotStandby case is more than aesthetically broken: The allocated (and reused) array is neither zeroed upon allocation, nor reinitialized, nor terminated. Not having a terminating element means that the end of the array will not be recognized and that recovery conflict handling will thus read ahead into adjacent memory. Only terminating when hitting memory content that looks like a invalid virtual transaction id. Luckily this seems so far not have caused significant problems, besides making recovery conflict more expensive. Discussion: 20150127142713.GD29457@awork2.anarazel.de Backpatch into all supported branches. Branch ------ REL9_2_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/8251acf23b098e92c4ff6252ef489b09c3f3895d Modified Files -------------- src/backend/storage/lmgr/lock.c | 4 ++++ 1 file changed, 4 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Properly terminate the array returned by GetLockConflicts(). @ 2015-01-29 22:20 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 6+ messages in thread From: Andres Freund @ 2015-01-29 22:20 UTC (permalink / raw) To: pgsql-committers Properly terminate the array returned by GetLockConflicts(). GetLockConflicts() has for a long time not properly terminated the returned array. During normal processing the returned array is zero initialized which, while not pretty, is sufficient to be recognized as a invalid virtual transaction id. But the HotStandby case is more than aesthetically broken: The allocated (and reused) array is neither zeroed upon allocation, nor reinitialized, nor terminated. Not having a terminating element means that the end of the array will not be recognized and that recovery conflict handling will thus read ahead into adjacent memory. Only terminating when hitting memory content that looks like a invalid virtual transaction id. Luckily this seems so far not have caused significant problems, besides making recovery conflict more expensive. Discussion: 20150127142713.GD29457@awork2.anarazel.de Backpatch into all supported branches. Branch ------ REL9_1_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/78f8c67054d0eb555cf7ef24aafb67f84b0fe65c Modified Files -------------- src/backend/storage/lmgr/lock.c | 4 ++++ 1 file changed, 4 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Properly terminate the array returned by GetLockConflicts(). @ 2015-01-29 22:20 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 6+ messages in thread From: Andres Freund @ 2015-01-29 22:20 UTC (permalink / raw) To: pgsql-committers Properly terminate the array returned by GetLockConflicts(). GetLockConflicts() has for a long time not properly terminated the returned array. During normal processing the returned array is zero initialized which, while not pretty, is sufficient to be recognized as a invalid virtual transaction id. But the HotStandby case is more than aesthetically broken: The allocated (and reused) array is neither zeroed upon allocation, nor reinitialized, nor terminated. Not having a terminating element means that the end of the array will not be recognized and that recovery conflict handling will thus read ahead into adjacent memory. Only terminating when hitting memory content that looks like a invalid virtual transaction id. Luckily this seems so far not have caused significant problems, besides making recovery conflict more expensive. Discussion: 20150127142713.GD29457@awork2.anarazel.de Backpatch into all supported branches. Branch ------ REL9_0_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/059f30c1b1afe861aa9541feb970494db05a1d2e Modified Files -------------- src/backend/storage/lmgr/lock.c | 4 ++++ 1 file changed, 4 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2015-01-29 22:20 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-01-29 22:20 pgsql: Properly terminate the array returned by GetLockConflicts(). Andres Freund <andres@anarazel.de> 2015-01-29 22:20 pgsql: Properly terminate the array returned by GetLockConflicts(). Andres Freund <andres@anarazel.de> 2015-01-29 22:20 pgsql: Properly terminate the array returned by GetLockConflicts(). Andres Freund <andres@anarazel.de> 2015-01-29 22:20 pgsql: Properly terminate the array returned by GetLockConflicts(). Andres Freund <andres@anarazel.de> 2015-01-29 22:20 pgsql: Properly terminate the array returned by GetLockConflicts(). Andres Freund <andres@anarazel.de> 2015-01-29 22:20 pgsql: Properly terminate the array returned by GetLockConflicts(). Andres Freund <andres@anarazel.de>
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