Hi Zsolt,

>One more nitpick question: will the test be stable on slow/heavily
>loaded buildfarm animals?

Thanks  it's a fair question, so I measured it and verified:

The window you're pointing at is the time from statement start
to the NOTICE, which px_crypt_shacrypt() emits while parsing
the salt, before any hashing. That path is bounded by a full
cheap crypt() call -- parse, plan, function entry and a complete
1000-round hash. On my test VM that call takes ~3 ms, and
~9 ms with the machine deliberately oversubscribed (24 CPU
spinners on 8 cores), against a 1s budget. I also ran the
three timeout cases ten times under that load: all ten runs
printed all three NOTICEs.

There's a similar pattern already in the tree: postgres_fdw's
query_cancel test depends on output produced before a timeout
kill, with statement_timeout = '10ms'.

So I believe 1s is stable in practice -- the kill would have
to land in a single-digit-millisecond window. But if you'd
still rather see a wider margin, I'm happy to bump it; the
only cost is that the three cases then take longer in every
run.

Regards,
Prashant

Reply via email to