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 1lxyUW-0006vl-MG for pgsql-general@arkaria.postgresql.org; Mon, 28 Jun 2021 21:08:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lxyUV-000833-NE for pgsql-general@arkaria.postgresql.org; Mon, 28 Jun 2021 21:08:27 +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 1lxyUV-00082u-DB for pgsql-general@lists.postgresql.org; Mon, 28 Jun 2021 21:08:27 +0000 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lxyUP-0000Eu-Ay for pgsql-general@postgresql.org; Mon, 28 Jun 2021 21:08:27 +0000 Received: by mail-ot1-x32e.google.com with SMTP id 110-20020a9d0a770000b0290466fa79d098so3665928otg.9 for ; Mon, 28 Jun 2021 14:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=Z94wnR2ZuOZvX/th22+r+0JIMCXWmjwa1eRt3eWYdOA=; b=R5ijtpSLErxmsHsi9uS2hZodKyVLliSKfVYPvC31bdmeyo4C/yxDzBK/huBcEEEAS8 C1rAXDWyWsLYpcJHW/NHGPTXC/4bj/16klm2xWyu4doOvWY7QmDXNxSroarv6Ui+KrOB eegywR4coNtTZXtba6MSdYMK6iFpD6SrXFgvR5EqwWQptdpx7N9QjxCASD3hcgJlef9r OLKlPcXQMeHQvhHx43E/8q0ZTC6tQ4+NPklfxVlXsjVc4C6GwnnJVY7sIqPTp5UQOK3R QeyMsgJKoWC0Wx3UmT6Lfm4ed2Q+FsiwMBACxfV5pAdpIKXMAwb40rTIrlAs7zusDvvS fP+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=Z94wnR2ZuOZvX/th22+r+0JIMCXWmjwa1eRt3eWYdOA=; b=HXlPYv8q70iazXsJRRWucffhmI1RTinc/ERYkKA+sF832V42gS/X5KCozl4kz5f//b kVTam/f8fmhIwZqWclzE1k5SRkcEwpwd8Jkl8dSr3SbQ0vRJiDSPhXSe93zZaQSmsz9o WD8epjmgJf8/XTdmLyrZpQn6arkg6uUojyKf+Kv6k+PHwSdae6bRXRUJV3dxCys3Ttah T5HVczAPCnsAEC1V1qLrFZFkSlbyqVCX+40Io06YPgLfi8e70yM56f7ayUlZev3UnI1P +oDANnGyGGc6yU4WpYC7S3eq6l9TnookPjRLCWGPil6k55uDepuYBy7J1gCRUk4IDTbu 3EzA== X-Gm-Message-State: AOAM530SvzfoMcw0UwISZeFVd2eg6iY+86gD7A+aKA1DSCmbM1sKB/g0 BIvQIAKBcE5YUad4GXu0KHlKHdQI0NrPLA== X-Google-Smtp-Source: ABdhPJzHF1+JZ7fus48ewR5HRTPjHruzTKieNDkE0XwlqWMbjgFhD1Oqnxc86XZGOnWQLtSKSPFfhQ== X-Received: by 2002:a05:6830:40b4:: with SMTP id x52mr1295301ott.117.1624914499062; Mon, 28 Jun 2021 14:08:19 -0700 (PDT) Received: from [192.168.88.10] (ip174-67-141-204.no.no.cox.net. [174.67.141.204]) by smtp.googlemail.com with ESMTPSA id c64sm3452090oif.30.2021.06.28.14.08.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Jun 2021 14:08:18 -0700 (PDT) To: "pgsql-general@postgresql.org" From: Ron Subject: ALTER TABLE ... DETACH PARTITION just sitting there Message-ID: Date: Mon, 28 Jun 2021 16:08:17 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk AWS RDS Postgresql 12.5. We've got a table partitioned by month range (FOR VALUES FROM ('2011-07-01') TO (2011-08-01')), and I've been detaching partitions from oldest to newest, one at a time. Whenever it's failed due to a FK constraint (and there are many of them!), I dropped the "same month" partition from TABLE_B, and then returned and dropped the partition from TABLE_A. But now, after 17 dropped partitions it's just sitting there on "ALTER TABLE table_a DROP PARTITION table_a_p2011_07;"  I'm the only user on this test instance, and validated that nothing else is blocking me. Are the FK validations what's causing the apparent "hang"?  (EXPLAIN ALTER TABLE... does not work.) -- Angular momentum makes the world go 'round.