Adding a TAP test checking data consistency on standby with minRecoveryPoint

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Subject: Adding a TAP test checking data consistency on standby with minRecoveryPoint
Date: 2018-11-08 04:45:25
Message-ID: 20181108044525.GA17482@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
recovery-min-lsn-tap.patch text/x-diff 4.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-11-08 04:56:23 Re: file cloning in pg_upgrade and CREATE DATABASE
Previous Message Amit Langote 2018-11-08 04:31:28 Re: move PartitionBoundInfo creation code