Redrock Postgres Documentation
Home Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Timeout - PgSleep

The PgSleep event occurs when a server process has called the pg_sleep function and is waiting for the sleep timeout to expire.

Likely causes of increased waits

This wait event occurs when an application, stored function, or user issues a SQL statement that calls the pg_sleep function.

The pg_sleep function delay execution until the specified number of seconds have elapsed. For example, SELECT pg_sleep(1) pauses for 1 second. For more information, see Delaying Execution in the PostgreSQL documentation.

Actions

Identify the statement that was running the pg_sleep function. Determine if the use of the function is appropriate.