Fix failure to mark init buffers as BM_PERMANENT.
Robert Haas <rhaas@postgresql.org>
Fix failure to mark init buffers as BM_PERMANENT. This could result in corruption of the init fork of an unlogged index if the ambuildempty routine for that index used shared buffers to create the init fork, which was true for gin, gist, and hash indexes. Patch by me, based on an earlier patch by Michael Paquier, who also reviewed this one. This also incorporates an idea from Artur Zakirov. Discussion: http://postgr.es/m/CACYUyc8yccE4xfxhqxfh_Mh38j7dRFuxfaK1p6dSNAEUakxUyQ@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/storage/buffer/bufmgr.c | modified | +6 −1 |
| src/include/storage/buf_internals.h | modified | +1 −1 |
Discussion
- Should buffer of initialization fork have a BM_PERMANENT flag 11 messages · 2017-01-25 → 2017-03-14