Commit Graph

6 Commits

Author SHA1 Message Date
Heikki Linnakangas
d97bd869ae Fix confusion on what record's LSN means.
A WAL record's LSN is the *end* of the record (exclusive), not the
beginning. The WAL receiver and redo code were confused on that, and
sometimes returned wrong page version because of that.
2021-03-31 16:54:31 +03:00
Heikki Linnakangas
cd98818a22 Add @LSN argument to GetPage requests 2021-03-31 12:13:10 +03:00
Heikki Linnakangas
1c1812df05 Fix decoding WAL segment header 2021-03-29 15:59:28 +03:00
Heikki Linnakangas
3de0148232 Misc page server cleanup
- reduce println chatter
- improve error handling in the GetPage@LSN function
2021-03-29 15:59:27 +03:00
Heikki Linnakangas
af7ebb6395 Implement WAL redo.
When a page is requested from the page cache (GetPage@LSN), launch postgres
in special "WAL redo" mode to reconstruct that page version.

Plus a bunch of misc fixes to the WAL decoding code.
2021-03-29 15:59:27 +03:00
Heikki Linnakangas
cdb20bf2a2 More work on the page server's WAL receiver
Add comments. Decode all records received in one XLogData, not just the
first one.
2021-03-29 15:57:15 +03:00