Re: Avoiding roundoff error in pg_sleep() - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Avoiding roundoff error in pg_sleep()
Date
Msg-id CAKFQuwa9mmwqt5JnLH8Fzq=Hb4cxAFX+M7BJwCGBS-_AZ8LkyA@mail.gmail.com
Whole thread Raw
In response to Re: Avoiding roundoff error in pg_sleep()  (Vladlen Popolitov <v.popolitov@postgrespro.ru>)
Responses Re: Avoiding roundoff error in pg_sleep()
List pgsql-hackers
On Friday, September 26, 2025, Vladlen Popolitov <v.popolitov@postgrespro.ru> 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.  True, it probably should never be used in production.

I can see a pipeline sequence tossing a wait command into the flow so having the server accept a wait instruction has at least some immediate merit.

David J.

pgsql-hackers by date:

Previous
From: Álvaro Herrera
Date:
Subject: Re: Remove unused for_all_tables field from AlterPublicationStmt
Next
From: Tom Lane
Date:
Subject: Re: Avoiding roundoff error in pg_sleep()