| From: | Oleg Tselebrovskiy <o(dot)tselebrovskiy(at)postgrespro(dot)ru> |
|---|---|
| To: | Greg Sabino Mullane <htamfids(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: psql's 001_basic.pl test could fail on very slow machines |
| Date: | 2026-03-10 11:01:47 |
| Message-ID: | bd9cab9439d724f935c41f6207809542@postgrespro.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Greg Sabino Mullane wrote at 2026-03-09 22:07:
> I don't think your new test is really testing the full functionality
> of \watch min, but I agree that existing test does not either. How
> about something like this?
>
> select now() as start \gset
> with x as (select now() - :'start' as howlong)
> select 123 from x where howlong < '0.5 second' \watch i=0.2 m=1
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
Maybe we could use sequences since we need a query that could
self-terminate, like in attached?
Regards,
Oleg
| Attachment | Content-Type | Size |
|---|---|---|
| 0002_rewrite_test.patch | text/x-diff | 769 bytes |
| 0002_manual_reproduction.patch | text/x-diff | 640 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ranier Vilela | 2026-03-10 11:09:46 | Re: Simplifies checks (src/bin/pg_dump/pg_backup_archiver.c) |
| Previous Message | Anders Åstrand | 2026-03-10 10:50:42 | Re: Potential security risk associated with function call |