Re: Improve error reporting in 027_stream_regress test

2025-07-29 Thread Tom Lane
Michael Paquier writes: > On Tue, Jul 29, 2025 at 12:41:39AM -0400, Tom Lane wrote: >> There is something strange happening on mamba --- not sure what, >> but its cycle time for the past week has been a lot more than normal. > We are getting PQPING_NO_RESPONSE meaning a lack of report activity >

Re: Improve error reporting in 027_stream_regress test

2025-07-28 Thread Nazir Bilal Yavuz
Hi, Thank you all for reporting the failure and sharing your inputs! On Tue, 29 Jul 2025 at 09:07, Michael Paquier wrote: > > On Tue, Jul 29, 2025 at 12:41:39AM -0400, Tom Lane wrote: > > Alexander Lakhin writes: > > > The new check has failed on mamba [1], apparently because this animal is > >

Re: Improve error reporting in 027_stream_regress test

2025-07-28 Thread Nazir Bilal Yavuz
Hi, On Tue, 29 Jul 2025 at 04:46, Michael Paquier wrote: > > > - 0002 is the actual patch that improves error reporting in the > > 027_stream_regress test by using the read_file_ends() function. It > > adds a regression_log_helper() function, which reads the > > PG_TEST_FILE_READ_LINES environmen

Re: Improve error reporting in 027_stream_regress test

2025-07-28 Thread Michael Paquier
On Tue, Jul 29, 2025 at 12:41:39AM -0400, Tom Lane wrote: > Alexander Lakhin writes: > > The new check has failed on mamba [1], apparently because this animal is > > too slow for pg_isready: > > There is something strange happening on mamba --- not sure what, > but its cycle time for the past wee

Re: Improve error reporting in 027_stream_regress test

2025-07-28 Thread Tom Lane
Alexander Lakhin writes: > The new check has failed on mamba [1], apparently because this animal is > too slow for pg_isready: There is something strange happening on mamba --- not sure what, but its cycle time for the past week has been a lot more than normal. I plan to power-cycle it tomorrow a

Re: Improve error reporting in 027_stream_regress test

2025-07-28 Thread Alexander Lakhin
Hello Nazir and Michael! 01.07.2025 10:57, Nazir Bilal Yavuz wrote: I agree with you. So, the current logic is: If primary is not alive: Do not report anything. If only primary is alive: Report the entire diff file. If both primary and standby are alive: Report entire diff file and add head+tai

Re: Improve error reporting in 027_stream_regress test

2025-07-28 Thread Andres Freund
Hi, On 2025-07-29 10:46:16 +0900, Michael Paquier wrote: > On Mon, Jul 28, 2025 at 03:34:06PM +0300, Nazir Bilal Yavuz wrote: > > I wanted to show what is in my mind, v4 is attached. Summary is: > > > > - 0001 introduces the read_file_ends() function, which reads lines > > from either the beginni

Re: Improve error reporting in 027_stream_regress test

2025-07-28 Thread Michael Paquier
On Mon, Jul 28, 2025 at 03:34:06PM +0300, Nazir Bilal Yavuz wrote: > I wanted to show what is in my mind, v4 is attached. Summary is: > > - 0001 introduces the read_file_ends() function, which reads lines > from either the beginning or end of a given file. It includes a > force_line_count argument

Re: Improve error reporting in 027_stream_regress test

2025-07-28 Thread Nazir Bilal Yavuz
read from the output files. This is useful when test output files + are large or contain unnecessary content, allowing the test framework to +read only a specified number of lines for comparison. + + If for some reason a particular platform generates a failure for a given tes

Re: Improve error reporting in 027_stream_regress test

2025-07-24 Thread Nazir Bilal Yavuz
Hi, On Tue, 22 Jul 2025 at 03:56, Michael Paquier wrote: > > On Mon, Jul 21, 2025 at 11:53:00AM +0300, Nazir Bilal Yavuz wrote: > > I realized that we actually don't trim the file, we do the opposite; > > read the file from both ends. Sorry for not realizing earlier. I will > > update the remaini

Re: Improve error reporting in 027_stream_regress test

2025-07-21 Thread Michael Paquier
On Mon, Jul 21, 2025 at 11:53:00AM +0300, Nazir Bilal Yavuz wrote: > I realized that we actually don't trim the file, we do the opposite; > read the file from both ends. Sorry for not realizing earlier. I will > update the remaining patches according to that but I think trim_file() > is helpful, to

Re: Improve error reporting in 027_stream_regress test

2025-07-21 Thread Nazir Bilal Yavuz
Hi, On Sat, 19 Jul 2025 at 09:06, Michael Paquier wrote: > > The structure is strange, it seems to me that we should target things > so as we have only one PG_TEST_FILE_TRIM_LINES defined in the tree, > not two with one local to 027. I see your point. Then the problem is regression_log_helper()

Re: Improve error reporting in 027_stream_regress test

2025-07-21 Thread Nazir Bilal Yavuz
Hi, On Sat, 19 Jul 2025 at 09:06, Michael Paquier wrote: > > This one looks acceptable to me, so applied to begin with something, > splitting things into two pieces for clarity with some tweaks. I have > changed things to use system_log() at the end, with fat-commas to link > the long options an

Re: Improve error reporting in 027_stream_regress test

2025-07-19 Thread Tom Lane
Michael Paquier writes: > On Fri, Jul 18, 2025 at 11:57:07AM +0300, Nazir Bilal Yavuz wrote: >> I added that as 0001. I used a shifting method for the 'tail' >> direction to not use too much memory. I found that there is >> 'File::ReadBackwards' in Perl but you need to install it, so I didn't >> u

Re: Improve error reporting in 027_stream_regress test

2025-07-18 Thread Michael Paquier
ine_count' as an argument but > 'PG_TEST_FILE_TRIM_LINES' environment variable overrides it. Should I > document 'PG_TEST_FILE_TRIM_LINES' somewhere? Documentation is required in regress.sgml, yes. > 0002: 'Improve error reporting in 027_stream_regress test

Re: Improve error reporting in 027_stream_regress test

2025-07-18 Thread Nazir Bilal Yavuz
nce, but it is easy to use. > > Sounds fine to me. Thanks! I added that as 0001. I used a shifting method for the 'tail' direction to not use too much memory. I found that there is 'File::ReadBackwards' in Perl but you need to install it, so I didn't use it. Now pat

Re: Improve error reporting in 027_stream_regress test

2025-07-16 Thread Michael Paquier
On Wed, Jul 16, 2025 at 02:32:53PM +0300, Nazir Bilal Yavuz wrote: > On Wed, 16 Jul 2025 at 04:39, Michael Paquier wrote: >> Hmm. Is that actually useful as we know that the standby has been >> stalen down when running the test? Even if we report something, we >> could always trim the output, li

Re: Improve error reporting in 027_stream_regress test

2025-07-16 Thread Nazir Bilal Yavuz
Hi, Thanks for looking into this! On Wed, 16 Jul 2025 at 04:39, Michael Paquier wrote: > > On Tue, Jul 01, 2025 at 10:57:11AM +0300, Nazir Bilal Yavuz wrote: > > On Mon, 30 Jun 2025 at 18:01, Andres Freund wrote: > >> One thing I don't yet like is that I think we should report if the primary >

Re: Improve error reporting in 027_stream_regress test

2025-07-15 Thread Michael Paquier
On Tue, Jul 01, 2025 at 10:57:11AM +0300, Nazir Bilal Yavuz wrote: > On Mon, 30 Jun 2025 at 18:01, Andres Freund wrote: >> One thing I don't yet like is that I think we should report if the primary is >> alive *before* reporting the diff and skipping reporting it if the primary >> crashed. It's no

Re: Improve error reporting in 027_stream_regress test

2025-07-01 Thread Nazir Bilal Yavuz
Yavuz Microsoft From b1039c23dc78934882c69329b8865fd5902cdcda Mon Sep 17 00:00:00 2001 From: Nazir Bilal Yavuz Date: Tue, 17 Jun 2025 16:08:20 +0300 Subject: [PATCH v2] Improve error reporting in 027_stream_regress test Previously, the 027_stream_regress test only reported that the regressio

Re: Improve error reporting in 027_stream_regress test

2025-06-30 Thread Andres Freund
Hi, On 2025-06-30 16:01:04 +0300, Nazir Bilal Yavuz wrote: > This patch aims to improve 027_stream_regress test's regression test > error reporting per Andres' suggestion [1]. Thanks for working on that! One thing I don't yet like is that I think we should report if the primary is alive *before

Improve error reporting in 027_stream_regress test

2025-06-30 Thread Nazir Bilal Yavuz
[1] https://www.postgresql.org/message-id/k46gdpibwaevxgb3cefgkl4weykcggal6evlbg5pcei4aswtli%40wrs732j5co3p -- Regards, Nazir Bilal Yavuz Microsoft From 8c1c69b42607b09dddc74ec25540b6afb48e0bd8 Mon Sep 17 00:00:00 2001 From: Nazir Bilal Yavuz Date: Tue, 17 Jun 2025 16:08:20 +0300 Subject: [PATCH v1] Improve error