Re: Transaction timeout

Поиск
Список
Период
Сортировка
От Andrey Borodin
Тема Re: Transaction timeout
Дата
Msg-id CAAhFRxg5VA_2fL=sJvN+M8rOZhyMkDF+pKMR=0815CEoFstjfQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Transaction timeout  (Nikolay Samokhvalov <samokhvalov@gmail.com>)
Ответы Re: Transaction timeout  (Nikolay Samokhvalov <samokhvalov@gmail.com>)
Список pgsql-hackers
Thanks for the review Nikolay!

On Fri, Jan 13, 2023 at 8:03 AM Nikolay Samokhvalov
<samokhvalov@gmail.com> wrote:
>
> 1) The current test set has only 2 simple cases – I'd suggest adding one more (that one that didn't work in v1):
>
> gitpod=# set transaction_timeout to '20ms';
> SET
> gitpod=# begin; select pg_sleep(.01); select pg_sleep(.01); select pg_sleep(.01); commit;
I tried exactly these tests - tests were unstable on Windows. Maybe
that OS has a more coarse-grained timer resolution.
It's a tradeoff between time spent on tests, strength of the test and
probability of false failure. I chose small time without false alarms.

> – it seems we could (should) have one more successful "1s wait, 3s sleep" iteration here, ~727ms somehow wasted in a
loop,quite a lot. 

I think big chunk from these 727ms were spent between "BEGIN" and
"select now(), clock_timestamp(), pg_sleep(3) \watch 1". I doubt patch
really contains arithmetic errors.

Many thanks for looking into this!


Best regards, Andrey Borodin.



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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Blocking execution of SECURITY INVOKER
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Blocking execution of SECURITY INVOKER