On Sun, 2026-10-25 at 22:17 +0900, 이정호 wrote: > 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?
Yes. Is the error message not clear? > 2. Are SQL syntax errors, data type errors, and constraint violations > reported > separately from statement_timeout errors? Yes. The statement is parsed *before* it can be executed. Syntax errors happen during parsing. For the statement to time out, it must be running. The statement cannot start running if there is a syntax error. > 3. Does this error confirm that the SQL statement was not completed within > the > configured time limit after reaching the PostgreSQL server? Yes. You will notice that the message was an error message. An error is a condition that terminates the execution of a statement, so the statement wasn't completed. > We understand that identifying the underlying cause of the delay may require > additional investigation. > However, our current request is specifically to confirm the technical meaning > of this error message, > rather than to determine responsibility for the delay. > We would greatly appreciate a written response based on PostgreSQL’s > documented behavior. The documentation describes that well, see https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-STATEMENT-TIMEOUT Abort any statement that takes more than the specified amount of time. If log_min_error_statement is set to ERROR or lower, the statement that timed out will also be logged. If this value is specified without units, it is taken as milliseconds. A value of zero (the default) disables the timeout. The timeout is measured from the time a command arrives at the server until it is completed by the server. If multiple SQL statements appear in a single simple-query message, the timeout is applied to each statement separately. (PostgreSQL versions before 13 usually treated the timeout as applying to the whole query string.) In extended query protocol, the timeout starts running when any query-related message (Parse, Bind, Execute, Describe) arrives, and it is canceled by completion of an Execute or Sync message. Yours, Laurenz Albe
