summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorRobert Haas2017-03-14 15:51:11 +0000
committerRobert Haas2017-03-14 16:06:36 +0000
commitbbd5e600ff5cd23bdbb63687748d34fa02690600 (patch)
treeee228f8f066944307b2c5d6f764095e9103a7120 /src/include
parent123f377a6602fce63c6d327b5f2304b78c8a1a94 (diff)
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
Diffstat (limited to 'src/include')
-rw-r--r--src/include/storage/buf_internals.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h
index c019013e720..d20c1399f42 100644
--- a/src/include/storage/buf_internals.h
+++ b/src/include/storage/buf_internals.h
@@ -39,7 +39,7 @@
#define BM_PIN_COUNT_WAITER (1 << 6) /* have waiter for sole pin */
#define BM_CHECKPOINT_NEEDED (1 << 7) /* must write for checkpoint */
#define BM_PERMANENT (1 << 8) /* permanent relation (not
- * unlogged) */
+ * unlogged, or init fork) */
typedef bits16 BufFlags;