]> granicus.if.org Git - postgresql/commit
Don't call PageGetSpecialPointer() on page until it's been initialized.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 30 Jun 2015 10:37:16 +0000 (13:37 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 30 Jun 2015 10:41:30 +0000 (13:41 +0300)
commitfdf28853ae6a397497b79fea69f89f4f7b9aa991
tree25f4732403b6f0c24d349e84803787f07723bbed
parentb48ecf862b3896631660ee8d38054aded82a4f8b
Don't call PageGetSpecialPointer() on page until it's been initialized.

After calling XLogInitBufferForRedo(), the page might be all-zeros if it was
not in page cache already. btree_xlog_unlink_page initialized the page
correctly, but it called PageGetSpecialPointer before initializing it, which
would lead to a corrupt page at WAL replay, if the unlinked page is not in
page cache.

Backpatch to 9.4, the bug came with the rewrite of B-tree page deletion.
src/backend/access/nbtree/nbtxlog.c