Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m2of8-0001AX-3Z for pgsql-general@arkaria.postgresql.org; Mon, 12 Jul 2021 05:39:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m2of7-0005tA-2h for pgsql-general@arkaria.postgresql.org; Mon, 12 Jul 2021 05:39:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m2of6-0005t0-Ph for pgsql-general@lists.postgresql.org; Mon, 12 Jul 2021 05:39:24 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m2of4-0004By-J4 for pgsql-general@postgresql.org; Mon, 12 Jul 2021 05:39:23 +0000 Received: by mail-wr1-x42c.google.com with SMTP id m2so12762107wrq.2 for ; Sun, 11 Jul 2021 22:39:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=RwFAF6wlEI4jpUMULzQw2Ay+2Wsn8kM8ln4UBLwUMSQ=; b=ajSA2FCgrdgjo0GicQBXwkmMZgrSncXFvg3zRFUxVvFc7xOw7IkMhUuFvl3Yg0wRJE dY/HPulYzKLOVN7WA8cfbo44z7Wp9ziliBbhBOAH3+o87r4+kfMztiP3BKFStwhI50M5 EdMq8HjEVNFY02ZFnzQHjlgOWkHX2Lxt2iN+vYN430dwM/Gy1wROJV4Q4ZYqpRhpiyh8 9JD9dwmMwU0GLSm05T3+UfDsjf0z/vIo3S74YeClblWXNAkgt/H1g8xiqGdkYlL4/3kT 4pCjfKLpq6O4xyRZuuss1ESOECObV9S6TqTtAiLT/O3KbQ4eDIN+58iq1WsCIs9AM6m6 WbTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=RwFAF6wlEI4jpUMULzQw2Ay+2Wsn8kM8ln4UBLwUMSQ=; b=U6ePl1x8REcsJ2JxaNXRxFoOMgxjxXnBddwo6fdIKa7lms4ubr6hejsnV0AkwcGbv7 Uedqu1r2aTAy+jRr2hy1XSr0za+Ql/UaF/h95tGlcH0pJpOPk5OzrsKWhsYWRwmOF2Nf 81ONmK5miwdqe+rDPQto3/DaI5zqMsrjXIPezoEwOSI9T+fm7ABIOfjFKd2PG4k6Lu/M WX0Lgk4SgHe11j52AZlraNk51K9+ByHGxvUPXqsdvUIUmvWHdmNcWPSG405tjahw8pEI 0LbBBjJnq60TlNpN+1tqIG5T7JyWbmaWhOAvYLJo1A6RgM9BveTncxnGw1XJnPc87sFW B7OA== X-Gm-Message-State: AOAM533E5v9zU35F1McKeKelBdszJWGAfUpYnhgT/VyakVLEsLrg0gAQ 3SCGruml4FNp8P3bEhqpJzvwwQ== X-Google-Smtp-Source: ABdhPJywrrrEZRlsjnPDbcZKGQJKi4gxmvqk0SKxXocrxnymsASm93GoAUk+ITk15QDFdvm5/+xrdA== X-Received: by 2002:a5d:6992:: with SMTP id g18mr39736035wru.118.1626068361115; Sun, 11 Jul 2021 22:39:21 -0700 (PDT) Received: from localhost.localdomain (217-149-171-247.nat.highway.telekom.at. [217.149.171.247]) by smtp.gmail.com with ESMTPSA id t9sm12791435wrq.92.2021.07.11.22.39.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Jul 2021 22:39:20 -0700 (PDT) Message-ID: <1c1e86caa87b9b344bcfc97b707507ec3db59907.camel@cybertec.at> Subject: Re: What to look for when excessively long commits From: Laurenz Albe To: Steve Baldwin , pgsql-general Date: Mon, 12 Jul 2021 07:39:20 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2021-07-09 at 06:35 +1000, Steve Baldwin wrote: > Hi all, > > If I'm seeing instances like this in our logs, what should I look for: > > 2021-07-06 22:15:34.702 UTC,"bcaas_api","bcaas",8124,"10.122.45.33:46386",60e4d5e6.1fbc,222,"COMMIT",2021-07-06 22:15:02 UTC,37/0,0,LOG,00000,"duration: 7128.250 ms",,,,,,,,,"" > 2021-07-06 22:15:34.702 UTC,"bcaas_api","bcaas",8483,"10.122.45.33:47274",60e4d5fc.2123,58,"COMMIT",2021-07-06 22:15:24 UTC,3/0,0,LOG,00000,"duration: 8419.856 ms",,,,,,,,,"" > 2021-07-06 22:15:34.702 UTC,"bcaas_api","bcaas",7665,"10.122.37.247:37530",60e4d5ca.1df1,286,"COMMIT",2021-07-06 22:14:34 UTC,26/0,0,LOG,00000,"duration: 8114.358 ms",,,,,,,,,"" > 2021-07-06 22:15:34.702 UTC,"bcaas_api","bcaas",6431,"10.122.45.33:42568",60e4d57f.191f,1828,"COMMIT",2021-07-06 22:13:19 UTC,40/0,0,LOG,00000,"duration: 8839.643 ms",,,,,,,,,"" > 2021-07-06 22:15:34.702 UTC,"bcaas_api","bcaas",8484,"10.122.45.33:47276",60e4d5fc.2124,126,"COMMIT",2021-07-06 22:15:24 UTC,7/0,0,LOG,00000,"duration: 8606.898 ms",,,,,,,,,"" > 2021-07-06 22:15:34.703 UTC,"bcaas_api","bcaas",8516,"10.122.37.247:41372",60e4d5fe.2144,94,"COMMIT",2021-07-06 22:15:26 UTC,16/0,0,LOG,00000,"duration: 7877.650 ms",,,,,,,,,"" > > The instance is in AWS RDS. It is a multi-az db.t3.xlarge machine class running 10.6. It also has a read replica if that could be relevant. > > Thanks for any suggestions. Possible causes in decreasing order of likelihood: - I/O overload (look at I/O wait % in the CPU time). - large WITH HOLD cursors Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com