Adding a TAP test checking data consistency on standby with minRecoveryPoint
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Postgres hackers <pgsql-hackers@postgresql.org>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Date: 2018-11-08T04:45:25Z
Lists: pgsql-hackers
Attachments
- recovery-min-lsn-tap.patch (text/x-diff) patch
Hi all, While working on a fix for c186ba13 which fixes the way minRecoveryPoint is updated for other processes than the startup process, I was struggling about being able to get that into a reproducible test case. I have been thinking what Andrew Gierth has mentioned yesterday, and roughly designed a test case mentioned here which is able to see the problem: https://www.postgresql.org/message-id/20181107044915.GF1677@paquier.xyz I have also been trying to shape that into a TAP test which can be added into the in-core recovery test suite, and it happens that the part which scans if all the pages of a relation are not newer than what minRecoveryPoint is set to in the control file can be easily calculated by using pageinspect and pg_control_recovery() with a simple SQL query. So, digging into it, I have been able to get a reproducible TAP test case which is in the patch attached. On HEAD, if you revert c186ba13 and then trigger the test the inconsistency shows up immediately. Keeping the fix makes the test pass. This test suite will make sure that we don't break again how minRecoveryPoint is handled across multiple processes, so I think that it would be a good addition for HEAD and the future. Thoughts? -- Michael
Commits
-
Add TAP test to check consistency of minimum recovery LSN
- b0825d28ea83 12.0 landed