summaryrefslogtreecommitdiff
path: root/src/include/storage/buf_internals.h
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2017-03-14 11:51:11 -0400
committerRobert Haas <rhaas@postgresql.org>2017-03-14 12:08:14 -0400
commit6bd7816e766abd6c10db16ed0af93a512b1a662d (patch)
tree224913b4662f04eb0a7beebb43e4459b94e2262c /src/include/storage/buf_internals.h
parent8c6b940bce881082a1a2aac871656b7044901108 (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/storage/buf_internals.h')
-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 870bb9cea19..e9520ef3b2e 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;