]> granicus.if.org Git - postgresql/commit
Fix failure to mark init buffers as BM_PERMANENT.
authorRobert Haas <rhaas@postgresql.org>
Tue, 14 Mar 2017 15:51:11 +0000 (11:51 -0400)
committerRobert Haas <rhaas@postgresql.org>
Tue, 14 Mar 2017 16:06:36 +0000 (12:06 -0400)
commitbbd5e600ff5cd23bdbb63687748d34fa02690600
treeee228f8f066944307b2c5d6f764095e9103a7120
parent123f377a6602fce63c6d327b5f2304b78c8a1a94
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
src/backend/storage/buffer/bufmgr.c
src/include/storage/buf_internals.h