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 1lt34g-0006F4-35 for pgsql-admin@arkaria.postgresql.org; Tue, 15 Jun 2021 07:01: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 1lt34d-0006n7-Qc for pgsql-admin@arkaria.postgresql.org; Tue, 15 Jun 2021 07:01:23 +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 1lt34d-0006my-DI for pgsql-admin@lists.postgresql.org; Tue, 15 Jun 2021 07:01:23 +0000 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lt34W-0000XT-J6 for pgsql-admin@lists.postgresql.org; Tue, 15 Jun 2021 07:01:22 +0000 Received: by mail-ed1-x52a.google.com with SMTP id i13so49657628edb.9 for ; Tue, 15 Jun 2021 00:01:15 -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:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=8FlVuqfdQRltxJ2j0Re886HNQlStcAH+Q/LzvVEeMZY=; b=ZG35VXk5U8JFLmzqhfbqYCDMS13IRnqX9Yl9Z0kpjzDZNh+LZIANckE28n381/mLUR OsdDuEZ7hk/9hJvKHii/0WvDJry2eT0/hx0VFtO3x9iUAb+rwEz3+klZeHjappKK4evG gSPqIK8ukiwYptFn9nJwRKPR6uCW26WWJPXZiZheK+tkri1NU9e/wAyA7TxNzOhnFpGg ep77NI/noHmG5kheAAbGyX1q+i46qetaal2tSzSzCmxHUmxdIeycekBxaRCXVhOiy8O7 hrw+4PlvGFUk8l82UoVxfEGejmcxj6h/bO0LzNbwsTedKz28eEFBWBRv9BIsdzKemv73 dJVg== 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:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=8FlVuqfdQRltxJ2j0Re886HNQlStcAH+Q/LzvVEeMZY=; b=so5LI1O95n4j8gKuQq1REMs9a8vfwZN19zqOGULBzXrU5b4M7taXCzSltDqtSSYtRR 3ri5bMQVJosErhES3Z2Uqt/HN7NJKOHeGpEGklHUVeacGMd98Yypf0v8rLEaYs8CQGCs gJ/rCqYpFfFipS4jXew4USqbyOg0E/WNJKXnpqmMBCWR0v3X7e/aWkUwQzyf9EiY5P3d 8Q+2SIIk7Xrd6E1/zbbzQ8VaHnEwsytwQGWWT3AXM03pYIdGfefkkHWdjh+XCK2sZJ+V hSn0XhDnjorqXlU29DaUyE009g5fFt/IQ511uQWfGqdCi4RnfGH+8tVrxB/uTEJcOFCb eRiA== X-Gm-Message-State: AOAM531oWVUhaAmMRWbyitXeqYeICCk8926vz7tI77JJPZPPkRbcMR0L tKkhtcxs/id0Gkzc9cQ03Pndmw== X-Google-Smtp-Source: ABdhPJyDbF6+5cf7u7WN9y0whPeIiv2Pyg1cxeylZN8EOjGALUkS2lxfdZBq1ri+wffwniJCF2GedQ== X-Received: by 2002:a50:b2c5:: with SMTP id p63mr7681987edd.5.1623740473883; Tue, 15 Jun 2021 00:01:13 -0700 (PDT) Received: from localhost.localdomain (217-149-171-220.nat.highway.telekom.at. [217.149.171.220]) by smtp.gmail.com with ESMTPSA id c13sm11216093edv.27.2021.06.15.00.01.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Jun 2021 00:01:13 -0700 (PDT) Message-ID: <05a195d0d4fc09c4552551e806fd7692b9804e24.camel@cybertec.at> Subject: Re: Kill postgresql process From: Laurenz Albe To: Julien Rouhaud Cc: abbas alizadeh , Pgsql-admin Date: Tue, 15 Jun 2021 09:01:12 +0200 In-Reply-To: References: <38E1E462-CA29-485F-9AC0-4339B9DB2913.ref@yahoo.com> <38E1E462-CA29-485F-9AC0-4339B9DB2913@yahoo.com> <37bda3bc33a441557fd658afc5dfbf3000f06d49.camel@cybertec.at> 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: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2021-06-15 at 00:25 +0800, Julien Rouhaud wrote: > Le mar. 15 juin 2021 à 00:15, Laurenz Albe: > > - Attach to the backend with gdb. > > - Enter "print ProcessInterrupts()" > > > > Of course that will not work if the backend is in uninterruptible > > sleep (for example, stuck in an I/O operation). > > that may be a terrible idea and leave a buffer pinned or something. > and if it's not it won't tell us where we're missing a CALL_FOR_INTERRUPTS If there is an error, AbortCurrentTransaction() gets called, which releases all buffer pins. If you were stuck in an endless loop in a critical section, you are going to crash anyway. If you want to investigate where you are stuck, run a backtrace first. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com