diff options
author | Andres Freund <andres@anarazel.de> | 2015-08-12 17:09:34 +0200 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2015-08-12 17:35:57 +0200 |
commit | 43a8ed26c97e36d971b6018d1bc94ad5c52d169b (patch) | |
tree | 5e4886b5052a41c98a5a5bbbffae0ee7a574984a /src/backend/access/gist/gistxlog.c | |
parent | c5bfcc18a09b3f56ae0fd434ff6c72bd185949c1 (diff) | |
download | postgresql-43a8ed26c97e36d971b6018d1bc94ad5c52d169b.tar.gz postgresql-43a8ed26c97e36d971b6018d1bc94ad5c52d169b.zip |
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
Diffstat (limited to 'src/backend/access/gist/gistxlog.c')
0 files changed, 0 insertions, 0 deletions