aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistsplit.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2015-07-27 12:28:21 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2015-07-27 12:32:08 +0300
commit579b9f97ce99c3ddc8e1de0e1b1f160da2e669c7 (patch)
treed818b23e8b79b75edbd923c0400f726631f2d2de /src/backend/access/gist/gistsplit.c
parent491c24f055fd14032dee6ed75d43d3aa076add0e (diff)
downloadpostgresql-579b9f97ce99c3ddc8e1de0e1b1f160da2e669c7.tar.gz
postgresql-579b9f97ce99c3ddc8e1de0e1b1f160da2e669c7.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/gist/gistsplit.c')
0 files changed, 0 insertions, 0 deletions