pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix two off-by-one errors in bufmgr.c. 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix two off-by-one errors in bufmgr.c. @ 2015-08-12 15:37 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 2+ messages in thread From: Andres Freund @ 2015-08-12 15:37 UTC (permalink / raw) To: pgsql-committers Fix two off-by-one errors in bufmgr.c. In 4b4b680c I passed a buffer index number (starting from 0) instead of a proper Buffer id (which start from 1 for shared buffers) in two places. This wasn't noticed so far as one of those locations isn't compiled at all (PrintPinnedBufs) and the other one (InvalidBuffer) requires a unlikely, but possible, set of circumstances to trigger a symptom. To reduce the likelihood of such incidents a bit also convert existing open coded mappings from buffer descriptors to buffer ids with BufferDescriptorGetBuffer(). Author: Qingqing Zhou Reported-By: Qingqing Zhou Discussion: CAJjS0u2ai9ooUisKtkV8cuVUtEkMTsbK8c7juNAjv8K11zeCQg@mail.gmail.com Backpatch: 9.5 where the private ref count infrastructure was introduced Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/d25fbf9f3ecffb5c80a9201a6310e74da24556a4 Modified Files -------------- src/backend/storage/buffer/bufmgr.c | 36 ++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) -- 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] 2+ messages in thread
* pgsql: Fix two off-by-one errors in bufmgr.c. @ 2015-08-12 15:37 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 2+ messages in thread From: Andres Freund @ 2015-08-12 15:37 UTC (permalink / raw) To: pgsql-committers Fix two off-by-one errors in bufmgr.c. In 4b4b680c I passed a buffer index number (starting from 0) instead of a proper Buffer id (which start from 1 for shared buffers) in two places. This wasn't noticed so far as one of those locations isn't compiled at all (PrintPinnedBufs) and the other one (InvalidBuffer) requires a unlikely, but possible, set of circumstances to trigger a symptom. To reduce the likelihood of such incidents a bit also convert existing open coded mappings from buffer descriptors to buffer ids with BufferDescriptorGetBuffer(). Author: Qingqing Zhou Reported-By: Qingqing Zhou Discussion: CAJjS0u2ai9ooUisKtkV8cuVUtEkMTsbK8c7juNAjv8K11zeCQg@mail.gmail.com Backpatch: 9.5 where the private ref count infrastructure was introduced Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/43a8ed26c97e36d971b6018d1bc94ad5c52d169b Modified Files -------------- src/backend/storage/buffer/bufmgr.c | 36 ++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) -- 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] 2+ messages in thread
end of thread, other threads:[~2015-08-12 15:37 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-08-12 15:37 pgsql: Fix two off-by-one errors in bufmgr.c. Andres Freund <andres@anarazel.de> 2015-08-12 15:37 pgsql: Fix two off-by-one errors in bufmgr.c. 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