Re: Implement generalized sub routine find_in_log for tap test

2023-06-10 Thread vignesh C
On Fri, 9 Jun 2023 at 08:31, Michael Paquier wrote: > > On Tue, Jun 06, 2023 at 06:43:44PM +0530, vignesh C wrote: > > Please find the attached patches that can be applied on back branches > > too. v5*master.patch can be applied on master, v5*PG15.patch can be > > applied on PG15, v5*PG14.patch ca

Re: Implement generalized sub routine find_in_log for tap test

2023-06-10 Thread Bharath Rupireddy
On Fri, Jun 9, 2023 at 8:29 AM Michael Paquier wrote: > > On Tue, Jun 06, 2023 at 05:53:40PM +0530, Bharath Rupireddy wrote: > > Yes. A simpler way of doing it would be to move advance_wal() in > > 019_replslot_limit.pl to Cluster.pm, something like the attached. CI > > members don't complain with

Re: Implement generalized sub routine find_in_log for tap test

2023-06-08 Thread Michael Paquier
On Tue, Jun 06, 2023 at 06:43:44PM +0530, vignesh C wrote: > Please find the attached patches that can be applied on back branches > too. v5*master.patch can be applied on master, v5*PG15.patch can be > applied on PG15, v5*PG14.patch can be applied on PG14, v5*PG13.patch > can be applied on PG13, v

Re: Implement generalized sub routine find_in_log for tap test

2023-06-08 Thread Michael Paquier
On Tue, Jun 06, 2023 at 05:53:40PM +0530, Bharath Rupireddy wrote: > Yes. A simpler way of doing it would be to move advance_wal() in > 019_replslot_limit.pl to Cluster.pm, something like the attached. CI > members don't complain with it > https://github.com/BRupireddy/postgres/tree/add_a_function_

Re: Implement generalized sub routine find_in_log for tap test

2023-06-06 Thread vignesh C
On Tue, 6 Jun 2023 at 09:36, Michael Paquier wrote: > > On Tue, Jun 06, 2023 at 08:05:49AM +0530, Amit Kapila wrote: > > Personally, I don't see any problem to do this refactoring for v16. > > However, sometimes, we do decide to backpatch refactoring in tests to > > avoid backpatch effort. I am no

Re: Implement generalized sub routine find_in_log for tap test

2023-06-06 Thread Bharath Rupireddy
On Tue, Jun 6, 2023 at 4:11 PM Michael Paquier wrote: > > On Tue, Jun 06, 2023 at 10:00:00AM +0530, Bharath Rupireddy wrote: > > +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

Re: Implement generalized sub routine find_in_log for tap test

2023-06-06 Thread Michael Paquier
On Tue, Jun 06, 2023 at 10:00:00AM +0530, Bharath Rupireddy wrote: > +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? As in a small

Re: Implement generalized sub routine find_in_log for tap test

2023-06-05 Thread Bharath Rupireddy
On Mon, Jun 5, 2023 at 9:39 PM vignesh C wrote: > > On Sun, 4 Jun 2023 at 03:51, Michael Paquier 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 abou

Re: Implement generalized sub routine find_in_log for tap test

2023-06-05 Thread Michael Paquier
On Tue, Jun 06, 2023 at 08:05:49AM +0530, Amit Kapila wrote: > Personally, I don't see any problem to do this refactoring for v16. > However, sometimes, we do decide to backpatch refactoring in tests to > avoid backpatch effort. I am not completely sure if that is the case > here. 033_replay_tsp_d

Re: Implement generalized sub routine find_in_log for tap test

2023-06-05 Thread Amit Kapila
On Sun, Jun 4, 2023 at 3:51 AM Michael Paquier wrote: > > On Mon, May 29, 2023 at 07:49:52AM +0530, vignesh C wrote: > > Thanks for the comment, the attached v3 version patch has the changes > > for the same. > > -if (find_in_log( > - $node, $log_offset, > - qr/peer aut

Re: Implement generalized sub routine find_in_log for tap test

2023-06-05 Thread vignesh C
On Sun, 4 Jun 2023 at 03:51, Michael Paquier wrote: > > On Mon, May 29, 2023 at 07:49:52AM +0530, vignesh C wrote: > > Thanks for the comment, the attached v3 version patch has the changes > > for the same. > > -if (find_in_log( > - $node, $log_offset, > - qr/peer authe

Re: Implement generalized sub routine find_in_log for tap test

2023-06-03 Thread Michael Paquier
On Mon, May 29, 2023 at 07:49:52AM +0530, vignesh C wrote: > Thanks for the comment, the attached v3 version patch has the changes > for the same. -if (find_in_log( - $node, $log_offset, - qr/peer authentication is not supported on this platform/)) +if ($node->log_conta

Re: Implement generalized sub routine find_in_log for tap test

2023-05-28 Thread vignesh C
On Sat, 27 May 2023 at 17:32, Andrew Dunstan wrote: > > > On 2023-05-26 Fr 20:35, vignesh C wrote: > > On Fri, 26 May 2023 at 04:09, Michael Paquier wrote: > > On Thu, May 25, 2023 at 06:34:20PM +0100, Dagfinn Ilmari Mannsåker wrote: > > However, none of the other functions in ::Utils know anythi

Re: Implement generalized sub routine find_in_log for tap test

2023-05-27 Thread Andrew Dunstan
On 2023-05-26 Fr 20:35, vignesh C wrote: On Fri, 26 May 2023 at 04:09, Michael Paquier wrote: On Thu, May 25, 2023 at 06:34:20PM +0100, Dagfinn Ilmari Mannsåker wrote: However, none of the other functions in ::Utils know anything about node objects, which makes me think it should be a method

Re: Implement generalized sub routine find_in_log for tap test

2023-05-26 Thread vignesh C
On Fri, 26 May 2023 at 04:09, Michael Paquier wrote: > > On Thu, May 25, 2023 at 06:34:20PM +0100, Dagfinn Ilmari Mannsåker wrote: > > However, none of the other functions in ::Utils know anything about node > > objects, which makes me think it should be a method on the node itself > > (i.e. in Po

Re: Implement generalized sub routine find_in_log for tap test

2023-05-26 Thread vignesh C
On Thu, 25 May 2023 at 23:04, Dagfinn Ilmari Mannsåker wrote: > > vignesh C writes: > > > Hi, > > > > The recovery tap test has 4 implementations of find_in_log sub routine > > for various uses, I felt we can generalize these and have a single > > function for the same. The attached patch is an a

Re: Implement generalized sub routine find_in_log for tap test

2023-05-25 Thread Michael Paquier
On Thu, May 25, 2023 at 06:34:20PM +0100, Dagfinn Ilmari Mannsåker wrote: > However, none of the other functions in ::Utils know anything about node > objects, which makes me think it should be a method on the node itself > (i.e. in PostgreSQL::Test::Cluster) instead. Also, I think log_contains >

Re: Implement generalized sub routine find_in_log for tap test

2023-05-25 Thread Dagfinn Ilmari Mannsåker
vignesh C writes: > Hi, > > The recovery tap test has 4 implementations of find_in_log sub routine > for various uses, I felt we can generalize these and have a single > function for the same. The attached patch is an attempt to have a > generalized sub routine find_in_log which can be used by al