Re: Add a perl function in Cluster.pm to generate WAL
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>,
Michael Paquier <michael@paquier.xyz>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
Andrew Dunstan <andrew@dunslane.net>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-06-11T01:44:54Z
Lists: pgsql-hackers
Attachments
- v1-0001-Add-a-perl-function-in-Cluster.pm-to-generate-WAL.patch (application/x-patch) patch v1-0001
On Wed, Aug 24, 2022 at 6:42 AM Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote: > > At Tue, 16 Aug 2022 18:40:49 +0200, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote in > > On 2022-Aug-16, Andrew Dunstan wrote: > > > > > I don't think there's a hard and fast rule about it. Certainly the case > > > would be more compelling if the functions were used across different TAP > > > suites. The SSL suite has suite-specific modules. That's a pattern also > > > worth considering. e.g something like. > > > > > > use FindBin qw($Bin); > > > use lib $Bin; > > > use MySuite; > > > > > > and then you put your common routines in MySuite.pm in the same > > > directory as the TAP test files. > > > > Yeah, I agree with that for advance_wal. Regarding find_in_log, that > > one seems general enough to warrant being in Cluster.pm -- consider > > issues_sql_like, which also slurps_file($log). That could be unified a > > little bit, I think. > > +1 With the generalized function for find_in_log() has been added as part of https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=e25e5f7fc6b74c9d4ce82627e9145ef5537412e2, I'm proposing a generalized function for advance_wal(). Please find the attached patch. I tried to replace the existing tests with the new cluster function advance_wal(). Please let me know if I'm missing any other tests. Also, this new function can be used by an in-progress feature - https://commitfest.postgresql.org/43/3663/. Thoughts? FWIW, it's discussed here - https://www.postgresql.org/message-id/ZIKVd%2Ba43UfsIWJE%40paquier.xyz. -- Bharath Rupireddy PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
Commits
-
Add PostgreSQL::Test::Cluster::advance_wal
- c161ab74f76a 17.0 landed
-
Refactor routine to find single log content pattern in TAP tests
- e25e5f7fc6b7 15.4 cited