Re: BUG #17288: PSQL bug with COPY command (Windows)

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #17288: PSQL bug with COPY command (Windows)
Дата
Msg-id YaMCaDC7koHSrmzv@paquier.xyz
обсуждение исходный текст
Ответ на Re: BUG #17288: PSQL bug with COPY command (Windows)  (Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>)
Ответы Re: BUG #17288: PSQL bug with COPY command (Windows)  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-bugs
On Fri, Nov 26, 2021 at 01:37:49PM +0100, Juan José Santamaría Flecha wrote:
> through a tap test using console input. Looking at the patch I'm not sure
> it is worth all the extra code, but I'm submitting it for future reference
> at least.

+       eval {
+               $result = IPC::Run::run [ 'psql', '-p', $port, '-c',
"\\copy public.test from stdin", 'postgres' ],
+                       IPC::Run::timeout( 1, name => "stall timeout" );
Using directly psql commands in the tests is not a good idea as it
makes the client-side execution more sensitive to the environment.
src/test/perl/PostgreSQL/Test/Cluster.pm does the same work, in the
wanted way, so it would be better to rely on it (see 384f1ab for one
recent issue).  A test with a minimal timeout also takes time, making
for slower tests on faster machines.

Hmm.  Do you think that a test based on Cluster::psql and stdout would
actually be able to do the work or would the redirection done in the
INIT block of Utils.pm prevent that?  Contrary to the code path of
pg_recvlogical, Cluster::psql would use directly IPC::Run, and not
redirect stdout to the test log file.

I would stick a test in one of the existing test suites, to not create
an extra cluster and reduce its run time.
--
Michael

Вложения

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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17301: SELECT gets weird result while two transactions are submitted concurrently
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #17288: PSQL bug with COPY command (Windows)