aboutsummaryrefslogtreecommitdiff
path: root/src/backend/regex
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-07-17 22:57:48 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-07-17 23:12:22 +0300
commit59c02a36f0ef317958b2d14313b5c8e41cfd9be6 (patch)
tree7b764ce11c5c050fe0a00c7491fa2dfb5a4e3a3b /src/backend/regex
parent3f2adace1ec025908b5189f0773b4eaab3d228d5 (diff)
downloadpostgresql-59c02a36f0ef317958b2d14313b5c8e41cfd9be6.tar.gz
postgresql-59c02a36f0ef317958b2d14313b5c8e41cfd9be6.zip
Fix assert failure at end of recovery, broken by XLogInsert scaling patch.
Initialization of the first XLOG buffer at end-of-recovery was broken for the case that the last read WAL record ended at a page boundary. Instead of trying to copy the last full xlog page to the buffer cache in that case, just set shared state so that the next page is initialized when the first WAL record after startup is inserted. (that's what we did in earlier version, too) To make the shared state required for that case less surprising, replace the XLogCtl->curridx variable, which was the index of the latest initialized buffer, with an XLogRecPtr of how far the buffers have been initialized. That also allows us to get rid of the XLogRecEndPtrToBufIdx macro. While we're at it, make a similar change for XLogCtl->Write.curridx, getting rid of that variable and calculating the next buffer to write from XLogCtl->LogwrtResult instead.
Diffstat (limited to 'src/backend/regex')
0 files changed, 0 insertions, 0 deletions