pgsql: Improve log pattern detection in recently-added TAP tests

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve log pattern detection in recently-added TAP tests
Date: 2021-06-12 06:30:26
Message-ID: E1lrxA2-0003R9-0f@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve log pattern detection in recently-added TAP tests

ab55d74 has introduced some tests with rows found as missing in logical
replication subscriptions for partitioned tables, relying on a logic
with a lookup of the logs generated, scanning the whole file. This
commit makes the logic more precise, by scanning the logs only from the
position before the key queries are run to the position where we check
for the logs. This will reduce the risk of issues with log patterns
overlapping with each other if those tests get more complicated in the
future.

Per discussion with Tom Lane.

Discussion: https://postgr.es/m/YMP+Gx2S8meYYHW4@paquier.xyz
Backpatch-through: 13

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bfd96b7a3dc26a8384d4185d274573fb6a46b033

Modified Files
--------------
src/test/subscription/t/001_rep_changes.pl | 7 ++++++-
src/test/subscription/t/013_partition.pl | 14 ++++++++++++--
2 files changed, 18 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2021-06-12 07:30:02 pgsql: Simplify some code in getObjectTypeDescription()
Previous Message Andres Freund 2021-06-12 04:42:41 pgsql: Improve and cleanup ProcArrayAdd(), ProcArrayRemove().