diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2015-07-27 12:28:21 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2015-07-27 12:28:21 +0300 |
commit | 023430abf72eb7d335430e241065d5ed19ddd94b (patch) | |
tree | 4fb0719906779bc0db720dcda1fb8b3f308f7053 /src/backend/access/transam/xlogreader.c | |
parent | 65c384c5abee7df6d27f98135790ea24c1b9578b (diff) | |
download | postgresql-023430abf72eb7d335430e241065d5ed19ddd94b.tar.gz postgresql-023430abf72eb7d335430e241065d5ed19ddd94b.zip |
Fix handling of all-zero pages in SP-GiST vacuum.
SP-GiST initialized an all-zeros page at vacuum, but that was not
WAL-logged, which is not safe. You might get a torn page write, when it gets
flushed to disk, and end-up with a half-initialized index page. To fix,
leave it in the all-zeros state, and add it to the FSM. It will be
initialized when reused. Also don't set the page-deleted flag when recycling
an empty page. That was also not WAL-logged, and a torn write of that would
cause the page to have an invalid checksum.
Backpatch to 9.2, where SP-GiST indexes were added.
Diffstat (limited to 'src/backend/access/transam/xlogreader.c')
0 files changed, 0 insertions, 0 deletions