Re: psql tests hangs

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: psql tests hangs
Дата
Msg-id CAFj8pRAT012OA98uT8NbG5vft=cT4TJCZK-v6ZtDF8kbc2H9TA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql tests hangs  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: psql tests hangs  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: psql tests hangs  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers


pá 12. 5. 2023 v 9:46 odesílatel Alvaro Herrera <alvherre@alvh.no-ip.org> napsal:
On 2023-May-12, Pavel Stehule wrote:

> It hangs in perl

I wonder if "hanging" actually means that it interpreted the sleep time
as a very large integer, so it's just sleeping for a long time.

There is some interaction with pspg in stream mode

The probable scenario

It is starting pspg due to my setting PSQL_WATCH_PAGER. pspg is waiting on quit command, or on pipe ending. Quit command cannot to come because it is not on tty, so it is dead lock

I can write to safeguard the fast ending on pspg when it is in stream mode, and tty is not available.

And generally, the root perl should to reset PSQL_WATCH_PAGER env variable before executing psql. Probably it does with PSQL_PAGER, and maybe with PAGER.

Regards

Pavel
 

About the server locale, note that the ->new() call explicitly requests
the C locale -- it's only psql that is using the Czech locale.
Supposedly, the Perl code should also be using the Czech locale, so the
sprintf('%g') should be consistent with what psql \watch expects.
However, you cannot ask the server to be consistent with that -- say, if
you hypothetically tried to use "to_char(9D99)" and \gset that to use as
\watch argument, it wouldn't work, because that'd use the server's C
locale, not Czech.  (I know because I tried.)

--
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"Puedes vivir sólo una vez, pero si lo haces bien, una vez es suficiente"

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG: Postgres 14 + vacuum_defer_cleanup_age + FOR UPDATE + UPDATE
Следующее
От: torikoshia
Дата:
Сообщение: Re: Allow pg_archivecleanup to remove backup history files