]> 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:03:29 +0000 (12:03 -0400)
commitc17a3f57ebc00615ca34a48bb17eca1ed14f8ceb
treec28adc4ae195e2db546a965a62b83b89aa6c5c5a
parentd999b896d801130da461d55560188e7c4d36819a
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 brin, 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