From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Testing WAL replay by comparing before and after images again |
Date: | 2015-09-04 12:45:56 |
Message-ID: | 55E99284.2020107@iki.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I rerun my little testing tool that compares buffer page contents after
every modification, in master and in WAL replay. Previously discussed
here: http://www.postgresql.org/message-id/5357B582.7060707@vmware.com.
Here's an updated version of my original hack, for current git master.
(Michael posted less-hacky versions of that, but unfortunately I haven't
gotten around to review his stuff.)
I did not find any new bugs. There were a couple of false positives
however. Firstly, the post-processing tool needed to be taught that BRIN
pages can have the PD_HAS_FREE_LINES flag set, and ignore that (like it
does for heap and other indexam pages).
Another issue was with the new speculative insertions. Replaying a
speculative insertion record sets the tuple's CTID to point to itself,
like in a regular insertion. But in the original system, the CTID is set
to a special speculative insertion token. The tool flagged up that
difference.
I propose the attached patch
(mark-speculative-insertions-in-replay.patch) to fix that in the replay
routine. This is not required for correctness, but helps this tool, and
seems like a good idea for debugging purposes anyway.
Any objections?
- Heikki
Attachment | Content-Type | Size |
---|---|---|
mark-speculative-insertions-in-replay.patch | text/x-diff | 1.2 KB |
0001-Write-buffer-image-before-and-after-every-WAL-record.patch | text/x-diff | 27.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2015-09-04 13:21:17 | Making tab-complete.c easier to maintain |
Previous Message | Teodor Sigaev | 2015-09-04 12:11:12 | Re: [PATCH] Microvacuum for gist. |