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 1pqz05-0001Y5-Dr for pgsql-general@arkaria.postgresql.org; Mon, 24 Apr 2023 16:25:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pqz04-0008A7-Bt for pgsql-general@arkaria.postgresql.org; Mon, 24 Apr 2023 16:25:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pqz04-00089y-0n for pgsql-general@lists.postgresql.org; Mon, 24 Apr 2023 16:25:12 +0000 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pqz01-004pKJ-RP for pgsql-general@lists.postgresql.org; Mon, 24 Apr 2023 16:25:11 +0000 Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-24704a7bf34so4154728a91.1 for ; Mon, 24 Apr 2023 09:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682353507; x=1684945507; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=2mFaEGC0QjymYkGp1llvM3A/d7QsWUaw53+HHdutfeI=; b=hXuGbpX7A6hbdcJAUwArn2fgyyz8OzT+7uULTtSWHy6j72y89uYeDpuIzRsV8bqu/a SRspg2R1YRSxp0h7TXWYc3ueJHlJ1T16ZRx6+kpH85JzZIxLfyvLx5KAsyy5rNsuZiwO 9YHO+c/EBGFkXuBQYPx9ehswkiezTOzDVYh65lU/RePLWQ40og19LhiR5DxqMUDug5JD PwTdGrZOGlBZ/YHP7wHL9UZZ52CGjeWKLPMzVYczlI2Pci8xKTrd9pqaOLcgsXK6oxgE afve+u847etJOLz0l+js1D4SG1YMNxOmShqyUDHSHQJO4fVqkP1gvIk516gC7Z7B0DxD FcjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682353507; x=1684945507; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2mFaEGC0QjymYkGp1llvM3A/d7QsWUaw53+HHdutfeI=; b=jrF6orAjnCjM/8dVlQMVnocUPfktSUZCKYqHyWWD4EjUsB19uSQK5YwesKj/6pC4xD Ucf1pyuTgP7nUeDLZWtBeIzXZLxJ2ePs603JNQ6OVRWuiQB7zGzdIbJb9v5cRqhVb3x1 ioZW+57qKQTj3cdAjc+HfldAh/SpSaWMHTazT2/KTT8skIgbdyOXUnLuys1Nc+4fvxfV Z5QjsVeJEf3GX6F6gde/HmACJQhTazkxvb6EZb+affQvUC+ypwLq09b4l9JhTy1+JyUP WC8VnR46CuK2ADmmSOEaaaRHMbzeURCmXRGejXT9aoMgvUsXU/vNd4OXRJcgZ/zWWSCc 2AnA== X-Gm-Message-State: AAQBX9d3wKUqGLZ5W1gdp2LvPIIIEwGKFDv2m4ayLecnSLa4VVkzcWRj 4rjru6zEqfSao11adQtjR5MM8fUQFu4MJ2amsik= X-Google-Smtp-Source: AKy350bPEiczR4saNAdV9L6gI2CnRyWe5kNhbxQJPZMsrLcq7+m71SAVlKCsbB7Rfy2syaqnTRQD1Az2KbGiZPeIMmA= X-Received: by 2002:a17:90a:d102:b0:24b:68da:1420 with SMTP id l2-20020a17090ad10200b0024b68da1420mr10955008pju.38.1682353507562; Mon, 24 Apr 2023 09:25:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Luca Ferrari Date: Mon, 24 Apr 2023 18:24:30 +0200 Message-ID: Subject: Re: what happens if a failed transaction is not rolled back? To: Siddharth Jain Cc: pgsql-general@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Apr 24, 2023 at 5:37=E2=80=AFPM Siddharth Jain = wrote: > i am asking: what happens if a failed transaction is not rolled back? A transaction either terminates by a commit or by a rollback. A failed transaction is an opened transaction that can be terminated only by a rollback. If you don't rollback, then your transaction is hold by the driver, that means for instance your pooler is not able to recycle it. Clearly, the exact behavior depends by the driver.