On Tue, Mar 10, 2026 at 7:01 AM Oleg Tselebrovskiy <
[email protected]> wrote:

> Yeah, your query fits the spirit of the test more and doesn't fail with
> modified post_auth_delay. We would expect 3 rows with
> this wait interval and '0.5 second' limit, but on really slow machines we
> could wait more than 0.2 seconds between watches and
> the test would still fail
>

The test should still pass. I'm not worried about how many rows appear,
just that they appear and then stop appearing once the criteria is met.


> Maybe we could use sequences since we need a query that could
> self-terminate, like in attached?
>

Yes, I like this one better. +1

Inlining it here as it's so small:

CREATE SEQUENCE watch_test;

WITH x AS (SELECT nextval('watch_test') > 3 AS seq_limit_reached)
SELECT 123 FROM x WHERE NOT seq_limit_reached \watch i=0.2 m=1



Cheers,
Greg

Reply via email to