On Mon, Nov 9, 2026 at 5:47 AM 이정호 <[email protected]> wrote:

> Hello,
>
> I am an automation system engineer in South Korea.
>
> Our application executes SQL INSERT statements on a PostgreSQL database
> using VBScript.
>
> During execution, we encountered the following error:
>
> canceling statement due to statement timeout
>
> Error while executing the query
>
> We would like to obtain a technical clarification regarding the exact
> meaning of this error.
>
> According to the PostgreSQL documentation, statement_timeout is measured
> from the time a command arrives at the server until it is completed.
>
> Could you please confirm the following?
>
>    1. Does this error indicate that PostgreSQL received the SQL command
>    and canceled it because the configured statement_timeout limit was 
> exceeded?
>
> Trivial to find out what error message that error triggers:

postgres=# set statement_timeout = '1s';
SET
postgres=# select pg_sleep(3000);
ERROR:  canceling statement due to statement timeout
postgres=#

You second message is likely from your client/application, not PostgreSQL


>    1. Are SQL syntax errors, data type errors, and constraint violations
>    reported separately from statement_timeout errors?
>
> Yes. The first one encountered is reported.  As is typical with nearly
all software.

>
>    1. Does this error confirm that the SQL statement was not completed
>    within the configured time limit after reaching the PostgreSQL server?
>
> "The timeout is measured from the time a command arrives at the server" =
"after reaching the PostgreSQL server"
https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-STATEMENT-TIMEOUT


David J.

Reply via email to