Re: pgbnech: allow to cancel queries during benchmark
От | Tatsuo Ishii |
---|---|
Тема | Re: pgbnech: allow to cancel queries during benchmark |
Дата | |
Msg-id | 20240119.174603.45051457415849373.t-ishii@sranhm.sra.co.jp обсуждение исходный текст |
Ответ на | Re: pgbnech: allow to cancel queries during benchmark (Yugo NAGATA <nagata@sraoss.co.jp>) |
Ответы |
Re: pgbnech: allow to cancel queries during benchmark
|
Список | pgsql-hackers |
>> +/* send cancel requests to all connections */ >> +static void >> +cancel_all() >> +{ >> + for (int i = 0; i < nclients; i++) >> + { >> + char errbuf[1]; >> + if (client_states[i].cancel != NULL) >> + (void) PQcancel(client_states[i].cancel, errbuf, sizeof(errbuf)); >> + } >> +} >> + >> >> Why in case of errors from PQCancel the error message is neglected? I >> think it's better to print out the error message in case of error. > > Is the message useful for pgbench users? I saw the error is ignored > in pg_dump, for example in bin/pg_dump/parallel.c I think the situation is different from pg_dump. Unlike pg_dump, if PQcancel does not work, users can fix the problem by using pg_terminate_backend or kill command. In order to make this work, an appropriate error message is essential. Best reagards, -- Tatsuo Ishii SRA OSS LLC English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp
В списке pgsql-hackers по дате отправления: