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.94.2) (envelope-from ) id 1uZpxu-008xlO-9o for pgsql-general@arkaria.postgresql.org; Thu, 10 Jul 2025 12:01:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uZpxr-00Boua-Id for pgsql-general@arkaria.postgresql.org; Thu, 10 Jul 2025 12:01:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uZpxr-00Bou5-7D for pgsql-general@lists.postgresql.org; Thu, 10 Jul 2025 12:01:23 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uZpxp-006ZEa-2a for pgsql-general@lists.postgresql.org; Thu, 10 Jul 2025 12:01:22 +0000 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-60c9d8a169bso1450570a12.1 for ; Thu, 10 Jul 2025 05:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752148880; x=1752753680; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=/eL+NXe/f7tlmcofdhcQ17Jxap5ymgpAAchQeC6aypE=; b=SUi4WOLzGfja/jdw5XH2splAQUt2pDQjTB5PnIyErHrooNGX2D768CwIkEf6Udx19Q tkiSHpyc1qVvUfRiJwlCkpsGmUZmIYrHU4QJBVQr0oEVekWkLqKrcLwscz6xTz9yAXKE YTZxZwB7IsVGFYxHqf/4tinHYm78YSii/AvnZJg1bTHT6NG0r/2vlFvVvrkd5h1gG/F+ qkDs1HZZ3/aP8kzrPF6R5TS5WDW/OOcq/QWSZFgFcCVS60cDf8NMcA93vscXMxtOmdZX 67tbhyFK1PQk2dCueI63gr988x6iP9I7FfyG8CTi0JGYfIF6aPKpwVYsITJ01kpuOgHW dJUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752148880; x=1752753680; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=/eL+NXe/f7tlmcofdhcQ17Jxap5ymgpAAchQeC6aypE=; b=qqqkl+DOK7qmkkGH1PN7xuKSqZrBVF//Vnc1r1K+uTCylZDWcMlfz7ZGVO/jhqbgtH YCY3uc+AlLfIkG3R5vSKGocPtjY2U3mQfPGvShcZPDGJsbU2nuA24IJji4OfJsUvvLvR XGlxCSn6QyEk4R8f7SbRH1vVHi+nWLP5aH313TC+QrjoMDBJBANqB5z5Za5/GIUvQdbb diUAxRswKt0DIcNFTB90IlQPIPsd/EZqqQxiJecZI6SsadcqIVn90yuOa5t2DNgXw/Nm EIkX5bqZLt/1IEk/38p/nCyc/VyrSIZa5a9p3t5jEljM2dukiEsv/4If42sMK1vObjTd HPIQ== X-Gm-Message-State: AOJu0YxxLlQAbYBAqCLCUb5xmbMCf/dWB73uwHVev0GLJqHO+nKJXxe7 fcm6WAm1VjAv/gLcXcEzjLZMFHRyXH/XTQPZX2aGD4jgFTCffTbIjZVX3PnAGkUmnOQ16CWBgAD yOEjTwezoJuypc16Bce3xFZ2b90gCmmXstCET X-Gm-Gg: ASbGncuJqX6KxksNEcl73Rx5nrPVxph+aDfpe06pHkBUqbTKFJO32WUYH3taR1ct45X xbgwLBbr5SA+Ykcc6qfFlaZrfVJEt4cOROCmOm9n+5Kt7oXR6WyTqUW8/lDM6so1enz4GNdctfu M8UaJT/g+eNgxU2XTQGj31oPPaqUdvpgsC6egbk8Czx/ob X-Google-Smtp-Source: AGHT+IFksq68gAUlhK2pXLK97urZlofVRwvBBxT9nGjhyt94kCO06b9E6ZfBJqUNfnhi75/CcoyjClC5ih8UMW4slEc= X-Received: by 2002:a50:d615:0:b0:60e:23d:43b6 with SMTP id 4fb4d7f45d1cf-611c84e45a0mr1641159a12.14.1752148879174; Thu, 10 Jul 2025 05:01:19 -0700 (PDT) MIME-Version: 1.0 From: Steve Baldwin Date: Thu, 10 Jul 2025 22:01:07 +1000 X-Gm-Features: Ac12FXz7AJnvLGPMUr0gOp_6xLLdd4wTNhahGCUojrUklLSNhT0eiRu4a1jbNLI Message-ID: Subject: Lock timeout in commit To: "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000897eec063991f357" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000897eec063991f357 Content-Type: text/plain; charset="UTF-8" Hi all, I'm occasionally seeing a lock timeout in a commit statement. For example: 2025-07-10 08:56:07.225 UTC,"b2bc_api","b2bcreditonline",23592," 10.124.230.241:60648",686f8022.5c28,55,"COMMIT",2025-07-10 08:56:02 UTC,3984/10729,676737574,ERROR,55P03,"canceling statement due to lock timeout",,,,,,"COMMIT",,,"098c62f7-bb76-4607-88da-120c6edee423","client backend",,-2835399305386018931 Am I right in thinking this is likely due to a deferred foreign key constraint? I couldn't see any obvious clue in the log. Is there somewhere else I can look? In case it matters, the server is running version 17.4. Thanks, Steve --000000000000897eec063991f357 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable