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 1vESkS-00Bvhi-F9 for pgsql-bugs@arkaria.postgresql.org; Thu, 30 Oct 2025 13:31:27 +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 1vESkR-008QmG-BH for pgsql-bugs@arkaria.postgresql.org; Thu, 30 Oct 2025 13:31:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vESkR-008Qm5-3O for pgsql-bugs@lists.postgresql.org; Thu, 30 Oct 2025 13:31:26 +0000 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vESkO-0054jC-0A for pgsql-bugs@lists.postgresql.org; Thu, 30 Oct 2025 13:31:25 +0000 Received: by mail-qt1-x832.google.com with SMTP id d75a77b69052e-4ecae310df8so15676021cf.2 for ; Thu, 30 Oct 2025 06:31:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761831081; x=1762435881; darn=lists.postgresql.org; 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=jOs6dNP9cTv2845kY6PRXnUK2sDdsAn7PUjfuzDhjeA=; b=j8d5ZdowNMLKUUSX8+dC75AUgJq4YzJlqsjrvNhVpHRxVh6oYo1vz52dAW8YQ+/l2m uU+voeKFtXSsxLUJNeGWOtVDvsobj8vcWeHED19RgvgvC5JpFjOlnT37eWMqeHhDxQNA 1qXbqkQtcjUifadH12F0ztdCZ/LHpMd+uloZGt4g+cQDSym8cY1LaB0cfQJdw4w2Z2rK pW7t6MP4O7edgybPV25zFMZn07+aym8F2OqAKMlG1fLbQm/lNPqt0+YCDUrbDzrtI8P0 ERb5RHUsCULtYQKtymJPDO+tt2FAl3YRyqiy237w7wz91TqLgwICPjfOYXl1hK304UYP i2kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761831081; x=1762435881; 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=jOs6dNP9cTv2845kY6PRXnUK2sDdsAn7PUjfuzDhjeA=; b=UwDUi4LHvuLlbPNHjyIvANflil8G9HgStdRaCaeoxn0QruAlG/3tDV71TJLnt/AuU2 jLhNbKZ3JgHkDp9ksmHq9vGnNPa/J7Bg/m8bZ66iFvwCD8i5UUMwth8hEB01y5j+qL7X vM75uLtt+STZYOxK8bHSp8J+NFqBB01l1Zj58JpuR6cRqRk0g44fyXxkNcFKwsvY94F3 LJ9xI9Iseu9R2YSoRhyrLr9avC5nqO+y7Ub7EUUaL0vRS3ZAUJhzWfQiklNP4ID8Fb9+ gZ0qjAx7fL/XXRvZ2G8gdDcTBIGbj0I+znydEyrIa5P7MYdHUL1fTvkCuTuDhvCXNhEb JuRg== X-Forwarded-Encrypted: i=1; AJvYcCWSt9YUK68mqjgaZwSgkUqK3XgQlHxd41T6/oXIga8PUsgRG2FoF4pdstDR9awD96W1g+5u8Fs+L2mD@lists.postgresql.org X-Gm-Message-State: AOJu0YyeenCgILKdapR2IVX3bNJn2U9n1TqfOdyIWEWCnf6npXTC8TUc OQQFQv0eTcyIS2V0QsUfu6TQW2IDiXCCoS8N0r8UtFUNuonVLnTe133R4z3t+pIX2cMxBgMI2hZ 2Clubl15N9zgVAaIcxqqkgVZ/yRxYr7g= X-Gm-Gg: ASbGncvjsRtbRjgpGQhzSjrrFxwETL9FqrHY4KeSTibUWVte6l5zrsA1OGKKjNO8K5Y dx0MqCebeMUa4xzfnNge7ovzdoBktHN2rOdtIQ6xIYI8k+L/NfemsXFRrOTRMvYXtIhNRRjadbK Vw/zQOM2M5A0O9DK29Le0LBMKuzN4jn1FcZ+LlavredB5/KZF+ICIHVbNWpHxzKZqybBDp8DgpQ H5+rQqose2gWacUu8EjDrZ13QHNJ4EkaR9tWkUniZG1OWvhJpSVIOJBbDm0R85sClJ7QKZ+GOvv GZvsZvgGaV9Nm8Qz X-Google-Smtp-Source: AGHT+IFHFb4wFiy/2ZA3vH1/2h4gN51KieAmNnn+tzoCPp9McyubsmMYsQetI3ve7ymo0R8c2L+5RAGYwdI2gPMXXBQ= X-Received: by 2002:a05:622a:408d:b0:4e8:9f4b:7505 with SMTP id d75a77b69052e-4ed15b5a90emr106685521cf.23.1761831081426; Thu, 30 Oct 2025 06:31:21 -0700 (PDT) MIME-Version: 1.0 References: <19099-e05dcfa022fe553d@postgresql.org> <2960545.1761800903@sss.pgh.pa.us> In-Reply-To: From: Kirill Reshke Date: Thu, 30 Oct 2025 18:31:09 +0500 X-Gm-Features: AWmQ_bmo7JTsOU3DsENY4VjMjJEXX5c1NUlS1tvmynIZ4p3VwNXYMtyRtRlFAqQ Message-ID: Subject: Re: BUG #19099: Conditional DELETE from partitioned table with non-updatable partition raises internal error To: Tender Wang Cc: Amit Langote , Tom Lane , jian he , exclusion@gmail.com, pgsql-bugs@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 Hi! On Thu, 30 Oct 2025 at 16:08, Tender Wang wrote: > > From the user's perspective, it's a bit confusing. > I agree more with Tom=E2=80=99s opinion =E2=80=94 we should throw an erro= r like "cannot delete from foreign table p1" > But the plan only had a dummy root relation; CheckValidResultRel() doesn'= t work. > Some other code place may need to do something. > Tom wrote: > It's surely pretty accidental (and arguably not desirable) > if "DELETE FROM pt WHERE false" doesn't fail the same way. I cannot prove to myself why failing here is actually desirable. Can you elaborate? --=20 Best regards, Kirill Reshke