Make smgr access for a BufferManagerRelation safer in relcache inval
Álvaro Herrera <alvherre@kurilemu.de>
Make smgr access for a BufferManagerRelation safer in relcache inval Currently there's no bug, because we have no code path where we invalidate relcache entries where it'd cause a problem. But it's more robust to do it this way in case we introduce such a path later, as some Postgres forks reportedly already have. Author: Daniil Davydov <3danissimo@gmail.com> Reviewed-by: Stepan Neretin <slpmcf@gmail.com> Discussion: https://postgr.es/m/CAJDiXgj3FNzAhV+jjPqxMs3jz=OgPohsoXFj_fh-L+nS+13CKQ@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/storage/buffer/bufmgr.c | modified | +27 −32 |
| src/backend/storage/buffer/localbuf.c | modified | +6 −4 |
| src/include/storage/bufmgr.h | modified | +11 −4 |
Discussion
- Accessing an invalid pointer in BufferManagerRelation structure 8 messages · 2025-01-27 → 2025-10-21