Re: psql tests hangs - Mailing list pgsql-hackers

From Tom Lane
Subject Re: psql tests hangs
Date
Msg-id 1429717.1683906653@sss.pgh.pa.us
Whole thread Raw
In response to Re: psql tests hangs  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: psql tests hangs
List pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> pá 12. 5. 2023 v 15:26 odesílatel Tom Lane <tgl@sss.pgh.pa.us> napsal:
>> Oh!  AFAICS, we don't do any of those things, but I agree it seems like
>> a good idea.  Can you confirm that if you unset PSQL_WATCH_PAGER then
>> the test passes for you?

> yes, I tested it now, and unset  PSQL_WATCH_PAGER fixed this issue.

OK.  So after looking at this a bit, the reason PAGER and PSQL_PAGER
don't cause us any problems in the test environment is that they are
not honored unless isatty(fileno(stdin)) && isatty(fileno(stdout)).
It seems to me that it's a bug that there is no such check before
using PSQL_WATCH_PAGER.  Is there actually any defensible reason
for that?

I think we do need to clear out all three variables in
Cluster::interactive_psql.  But our regular psql tests shouldn't
be at risk here.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: [PATCH] Slight improvement of worker_spi.c example
Next
From: Pavel Stehule
Date:
Subject: Re: psql tests hangs