Re: Implement generalized sub routine find_in_log for tap test

Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>

From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
To: vignesh C <vignesh21@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, Andrew Dunstan <andrew@dunslane.net>, Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-06-06T04:30:00Z
Lists: pgsql-hackers
On Mon, Jun 5, 2023 at 9:39 PM vignesh C <vignesh21@gmail.com> wrote:
>
> On Sun, 4 Jun 2023 at 03:51, Michael Paquier <michael@paquier.xyz> wrote:
> >
> > This looks like a typo to me, the log offset is eaten.
> >
> > Except of that, I am on board with log_contains().
>
> Thanks for fixing this.

+1 for deduplicating find_in_log. How about deduplicating advance_wal
too so that 019_replslot_limit.pl, 033_replay_tsp_drops.pl,
035_standby_logical_decoding.pl and 001_stream_rep.pl can benefit
immediately?

FWIW, a previous discussion related to this is here
https://www.postgresql.org/message-id/flat/CALj2ACVUcXtLgHRPbx28ZQQyRM6j%2BeSH3jNUALr2pJ4%2Bf%3DHRGA%40mail.gmail.com.

-- 
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



Commits

  1. Refactor routine to find single log content pattern in TAP tests

  2. Refactor log check logic for connect_ok/fails in PostgreSQL::Test::Cluster