Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xQQam-000000006V8-10XA for pgsql-general@arkaria.postgresql.org; Mon, 09 Nov 2026 14:43:28 +0000 Received: from localhost ([127.0.0.1]:50404 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xQQak-00000001cfT-3pSt for pgsql-general@arkaria.postgresql.org; Mon, 09 Nov 2026 14:43:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]:37950) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xQQZT-00000001YRj-1Rqv for pgsql-general@lists.postgresql.org; Mon, 09 Nov 2026 14:42:07 +0000 Received: from mail-wm2-x04.google.com ([2a00:1450:4864:31::4]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1xQQZS-000000002sK-1v2a for pgsql-general@lists.postgresql.org; Mon, 09 Nov 2026 14:42:06 +0000 Received: by mail-wm2-x04.google.com with SMTP id 5b1f17b1804b1-4b4e4d13850so3865405e9.1 for ; Mon, 09 Nov 2026 06:42:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1794235324; x=1794840124; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:to:from:subject:message-id:from:to:cc :subject:date:message-id:reply-to:content-type; bh=uGiTxjj+iJMVat2crUBx7TvYiv5fMxTQNhmXPcyPMJY=; b=OlMaGYuiPrptEUo4O5ACDMygZbsd2gdE0QJmE/8HG04+Kv5biC2CY9lAbS95+qoEj8 ntz4FElwho2ptOrZENOy+jk/ILco205N6NGquKir1reNiQJ9BDV53ue1+Iv6RgILtp2J 0gaXa8xDWxTd7zFoIHvbmBNKPEP00Q3SRgV2PPpVdayDfm3Cc9y5oApdU8q7xaiefcHc Takc7ALNOrRisBgQ58MXVb4ow2L5mGjO9FTIrQN/O7Zw4dg3Hl54xHl4ePaovsjfJ7G5 7k2dLtKpFB9KUp9vBWf6ZLPeU7+aUJryBVS7MaZj06geeC5UfUlMTp0g7M/+EhnxN6jN LUDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794235324; x=1794840124; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=uGiTxjj+iJMVat2crUBx7TvYiv5fMxTQNhmXPcyPMJY=; b=I4jqk+oUJvqEBBx/ETNRXu8BUro8WXowJhbcf5lI+nJu63yKgY1ALNc4o+rdixjw2F 3NgWHb3EAMSf5EI1+v+rToF9sP7VgmR7WV8seo32SNCH/w0xdiIpJb1viSb8KPxPfpGH BDiFGOZ9IbzHsLsmuceTSQztTAT821icW1d/PBvOJobaqvncPYGJSkRCJwvCXqblu4Gd WdUYIDxINSmK3+4rW0nVbCnVIEDPxKQdar/jAu74TD6dVVqhrVKtH+a6HHxySzAOl4DA NLcW99UQVliBvTP5UqYvMyJBRSCH1lbZengsWEZcqWsnei0JCatra6KWsbzuZBPBn8gJ yKrg== X-Forwarded-Encrypted: i=1; AL+hErEFkv3vb+bAsS/RlyDvZNhm3qtr0kJZYPjWZ1D5SKw51g0KFye1U7Vc0W/EM8dxeBpL79HCMlWl+kjrja+H@lists.postgresql.org X-Gm-Message-State: APuU4Z8KPyXGWtOnfqDfUhyrFjDo3QiTjw5+n2wl3nYA26NE11DbNobt jqYsYGLdX6jjLdtgHX5uxxDJSTyuZxLzOZFt6ux8GzUakbk/EJA7AIm0yeycK1s2GX8= X-Gm-Gg: AYBFou1RSYrI/pU2mP6uOB4SdlYV7CN4tS9+uK7KzCBmHvUWUJGysMTnkWmX3uLXttJ O2f/g0s7tEgoVt9VD1phUw4icXnCLJPT2r6wR4FQv3LQ+jRzKrIN/Rkpng6VbGzf14oiDO/o82u Mueymm1RoaAgbKfTQv2SV0LTH54eDq/t9YCjxw9yB7qW/LGquz0eJIvNH9/wLWPAJz2RLdyoJId mpCCMZIc8NYxgI/Ye0qUPerD84wbRy5y53/SzJ4wA557lYyX4CJoMHxf5K+HYX93Mawq75z+pEE HZHwlDUZmV6hNgf+nW4Mor11lRDHD/kqj4KPKe16SrYqTPkZPdI3l56v5NSuD11zLtfLWw6asxF oY2JsX1/YuaDIcaWvZ+QvX3T316WD8q/o83Id83rntguxD8d7VlVwbsrwg4mu/lLVvjbcspnZl5 C59ZT636NRt3+D6y8aIpI/q4g3V7ZBIW+0BbOjJF3nQRtwpK0RPU9iN+Tyzxp/Eebg1xEyIHetk vy3IMgxEbI5Bf4kNkxG4hOPcG0HFQXL3GnmyovCzvLwOU43aFeH+G4YINWkuYoYplDvNLk1fAVk Pm1atbaTObJa0Dl73Btm0/DJXqX1M7uQlK7LwI4n8y274JBhkpZZJjjDdf4= X-Received: by 2002:a05:600c:4eca:b0:4a2:5267:3cd4 with SMTP id 5b1f17b1804b1-4b94d762f4dmr74992575e9.3.1794235324528; Mon, 09 Nov 2026 06:42:04 -0800 (PST) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:70:15d6:a4e9:b86e:f6c3:801b]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4b7efb134ccsm219575635e9.10.2026.11.09.06.42.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2026 06:42:04 -0800 (PST) Message-ID: <946c347b742aa68be103ec00febfc17e79bfac3e.camel@cybertec.at> Subject: Re: Request for Official Technical Clarification on PostgreSQL statement_timeout Error From: Laurenz Albe To: =?UTF-8?Q?=EC=9D=B4=EC=A0=95=ED=98=B8?= , pgsql-general@lists.postgresql.org Date: Mon, 09 Nov 2026 15:42:03 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.60.2 (3.60.2-3.fc44) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, 2026-10-25 at 22:17 +0900, =EC=9D=B4=EC=A0=95=ED=98=B8 wrote: > During execution, we encountered the following error: >=20 > canceling statement due to statement timeout > Error while executing the query >=20 > We would like to obtain a technical clarification regarding the exact mea= ning 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? > =C2=A0=C2=A0=C2=A01. Does this error indicate that PostgreSQL received th= e SQL command and canceled it > because the configured statement_timeout limit was exceeded? Yes. Is the error message not clear? > =C2=A0=C2=A0=C2=A02. Are SQL syntax errors, data type errors, and constra= int 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. > =C2=A0=C2=A0=C2=A03. Does this error confirm that the SQL statement was n= ot 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 requ= ire additional investigation. > However, our current request is specifically to confirm the technical mea= ning of this error message, > rather than to determine responsibility for the delay. > We would greatly appreciate a written response based on PostgreSQL=E2=80= =99s documented behavior. The documentation describes that well, see https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-STAT= EMENT-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 t= imed 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 unt= il 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 runni= ng when any query-related message (Parse, Bind, Execute, Describe) arrives, and i= t is canceled by completion of an Execute or Sync message. Yours, Laurenz Albe