Re: psql tests hangs

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: psql tests hangs
Дата
Msg-id CAFj8pRC4a_gMC+o8qrRYfEZyui8fgE-ezpZZxMk3346MtR200Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql tests hangs  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: psql tests hangs  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers


pá 12. 5. 2023 v 17:50 odesílatel Tom Lane <tgl@sss.pgh.pa.us> napsal:
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?

Theoretically, we can write tests for these features, and then stdout, stdin may not be tty.

Except for testing, using pager in non-interactive mode makes no sense.

Regards

Pavel



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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: psql tests hangs
Следующее
От: MARK CALLAGHAN
Дата:
Сообщение: Re: Large files for relations