From: | Andrey Borodin <amborodin86(at)gmail(dot)com> |
---|---|
To: | Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com> |
Cc: | Nathan Bossart <nathandbossart(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Transaction timeout |
Date: | 2023-01-13 18:15:56 |
Message-ID: | CAAhFRxg5VA_2fL=sJvN+M8rOZhyMkDF+pKMR=0815CEoFstjfQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thanks for the review Nikolay!
On Fri, Jan 13, 2023 at 8:03 AM Nikolay Samokhvalov
<samokhvalov(at)gmail(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2023-01-13 18:30:43 | Re: Blocking execution of SECURITY INVOKER |
Previous Message | Jeff Davis | 2023-01-13 18:04:19 | Re: Blocking execution of SECURITY INVOKER |