Re: Intermittent failure with t/003_logical_slots.pl test on windows - Mailing list pgsql-hackers

From vignesh C
Subject Re: Intermittent failure with t/003_logical_slots.pl test on windows
Date
Msg-id CALDaNm1PT=oi+dmDdunTc0JrhXMFgSo1C1_FJb9ZgjRKzMhMcg@mail.gmail.com
Whole thread Raw
In response to Re: Intermittent failure with t/003_logical_slots.pl test on windows  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Intermittent failure with t/003_logical_slots.pl test on windows
List pgsql-hackers
On Tue, 31 Oct 2023 at 17:51, Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Tue, Oct 31, 2023 at 4:53 PM Nisha Moond <nisha.moond412@gmail.com> wrote:
> >
> > There is a failure with 't/003_logical_slots.pl' test during the
> > upgrade. The failure is intermittent and observed in the Windows
> > environment.
> >
>
> How did you reach the conclusion that it is only for
> 't/003_logical_slots.pl'? I see that the failure is while pg_upgrade
> internally running pg_resetwal -V command to check the version which
> doesn't seem to be directly related to the newly added test or code.

I also felt it is not related to the 003_logical_slots test, I felt
the problem might be because of the pipe_read_line function:
....
pipe_read_line(char *cmd, char *line, int maxsize)
{
FILE *pgver;

fflush(NULL);

errno = 0;
if ((pgver = popen(cmd, "r")) == NULL)
{
perror("popen failure");
return NULL;
}

errno = 0;
if (fgets(line, maxsize, pgver) == NULL)
...

Few others are also facing this problem with similar code like in:
https://stackoverflow.com/questions/15882799/fgets-returning-error-for-file-returned-by-popen

Regards,
Vignesh



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Is this a problem in GenericXLogFinish()?
Next
From: Bruce Momjian
Date:
Subject: Re: [PATCH] postgresql.conf.sample comment alignment.