Re: Intermittent failure with t/003_logical_slots.pl test on windows

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Intermittent failure with t/003_logical_slots.pl test on windows
Date: 2023-10-31 12:41:48
Message-ID: CALDaNm1PT=oi+dmDdunTc0JrhXMFgSo1C1_FJb9ZgjRKzMhMcg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 31 Oct 2023 at 17:51, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Tue, Oct 31, 2023 at 4:53 PM Nisha Moond <nisha(dot)moond412(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2023-10-31 12:51:48 Re: [PATCH] postgresql.conf.sample comment alignment.
Previous Message Robert Haas 2023-10-31 12:37:50 Re: Is this a problem in GenericXLogFinish()?