On Friday, September 26, 2025, Vladlen Popolitov <[email protected]>
wrote:

> Hi David,
>
> David G. Johnston писал(а) 2025-09-26 18:08:
>
>> On Friday, September 26, 2025, Vladlen Popolitov
>> <[email protected]> wrote:
>>
>> It looks like sleep has the wrong place in a function. It should be
>>> an utility command, that does not start a transaction.
>>>
>>
>> Then write that command.  We’re not going to change pg_sleep.
>> It’s works just as advertised.
>>
>
> It _does_ not work as it advertised. Help page states:
> 1) "delay execution of the server process"
> 2) "pg_sleep makes the current session's process sleep"
> In reality it stops other backends too.
>

That is not reality.  And as noted, any similar reality is not only
manifested by using this function.

You are going to need to construct a test case demonstrating your concerns,
which will likely alleviate them instead.  Or, at least, let you accept
that once you’ve given someone a login to your database they can indeed
perform a DoS on it if you haven’t taken appropriate precautions with
timeouts and such.

David J.

Reply via email to