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.96) (envelope-from ) id 1wKnKr-001J0U-1k for pgsql-hackers@arkaria.postgresql.org; Thu, 07 May 2026 01:15:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wKnKo-001OUI-2S for pgsql-hackers@arkaria.postgresql.org; Thu, 07 May 2026 01:15:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wKnKo-001OU8-1I for pgsql-hackers@lists.postgresql.org; Thu, 07 May 2026 01:15:26 +0000 Received: from mail-ua1-x936.google.com ([2607:f8b0:4864:20::936]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wKnKm-00000000ZLa-0iD5 for pgsql-hackers@lists.postgresql.org; Thu, 07 May 2026 01:15:25 +0000 Received: by mail-ua1-x936.google.com with SMTP id a1e0cc1a2514c-95d226e3ed8so1078200241.0 for ; Wed, 06 May 2026 18:15:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1778116524; cv=none; d=google.com; s=arc-20240605; b=EeSJBcXteNq+IfjvX3awYTV5wEqZbJehzR/eMPM924NzJip/AeOOtAxCLHi+331JVV FWH58eVJFqR/JG+munjePnifhIQjvkWmGRS7SRzwu+YNiUehmEf32//NfZHOAHW5cae1 yqnMUkPMqDCtUhDM/FKuVrL0n3KR8pB2D3CaVRsDzojEjUPwPDX0WRD9vi4S2yRLf0gf gVBloqT7E2Vk6XUKh1FPQZvQ7PfcjIeBG2mN32u0qfrxSQI/yIMkF+QAQzRiR+bB7nN/ vyiY1w1FQsJoW/AAEqp6OdhLSJ/wE+uOBX00HVHAiFpKYwZVsTwtMGKEe84ELKiqIV+L BvjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=uhmmdVlpRv8760Zxbz9kx3iRcBjI5g3JdvhSmTBD+Oo=; fh=wYdvKCdkeIhMa+ZhHvtSRG1Y9rqoC6cXamhy26Qa+Ac=; b=SaxnqYCVPPTCeusTLAqm4CvfDwXh+jr47hGXt24aIoS9hwqUcxL55YYHDz8U5YMjqx r7m2VKEv1HNEKtfufiG/ImVETYbZSNGcwgE6fBu8byYZHTov9aWmPHITBBkzBQQ4Ij1V 1918J1keezOAafL1L3wkuNJ7eECEQSzmzAWBmooA0IeGXzODe5QkucQLAQrlmFG0nG3n Pfb+JZkK1ulDozlOKPCRQpoFD+w5KOI+EFAuYb27BHcBBUFqmrVbu09tOgjsOM/C0Hxn K1Qzmn8ZtdjqpUmWdYL1tJltNeVaK8/NvTRghM/L6bzFEP8lBgERq701kItaXUrLJzlM tg1w==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778116524; x=1778721324; 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=uhmmdVlpRv8760Zxbz9kx3iRcBjI5g3JdvhSmTBD+Oo=; b=kODqW91dMV89TXkegvlgaeFMsS+dnWTd2weVmeWYCzLZYkP9cBA3C6ieyYN08fsT25 ySdWxFbAUvt3pim1rO6wSeOeuUb6kgMpFgXYHSmZ65GBP/KjSByTmgViaCfucfJ/7+aJ qhVhT2Zv3Iwc58TZc63KO3cxld+DH81KjXYIYgF2gSeTTOKWZQVDNTxv4QghrUsSJ0dr iReLTly3WFRAP7ul9Nmb6JO3M4zO5RvSF0utgmcVFUVTuALFBQForsPkOByiyqZCkJXG Z+LL1vzPXgzUxmPw5EElxLus3FcZSvpfB8YnNwFQ/K6M1CDm1ue1K3R32yB1LUbO9Psz +LbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778116524; x=1778721324; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=uhmmdVlpRv8760Zxbz9kx3iRcBjI5g3JdvhSmTBD+Oo=; b=C1wiLBxJEh6fE3lSVtQb9tWos0s9vKaKitcwsPr2XtBddQsgHu8MRLE/+JUHi2CULp sE7fDcaNOFKiAZ76CXchC9yDmVNtoBjmqSV7V04eHShDurlcyrHddoCy4QZCdMFiRBRS 1sV1t/57Z9rTejyUKeK111m4GRUSPhGyojKdpye863tv1deKZtqPI65NUZZPU5GOfDGZ VAb1wQ4CBt+8rvAHPFCO9JeIbkcSDHX7v8Yk95X1NtGwlSwVWfXnEnkX5KHN0cErTElA jyQP24RxfxTYbjBJGzO9Y3uosZL4NKRVCQTzgYY1WDJQAihNG638StiNig+nVNBPBNmd KlPg== X-Forwarded-Encrypted: i=1; AFNElJ/UiBoQgUYA+YFikZPYVi1jW1kSlDq+3siIZ54b/3L7VBBKelSUIXJUfAe92/vYpQTAHCn8etb2x63JQNGe@lists.postgresql.org X-Gm-Message-State: AOJu0YwySj62gOVVbAjbFtDlLLnyzBcgwXFbAOyEvPKhC0rF34H/Y+/2 RFoNAZ0NWUmHUpq8ken+h3GmQA1kWz2t0GLp6PPR4zdL0RIgeCFGoi5sLYp4vzvtiwPxX+xOu1D lov6VuRSuloCLSk0K4GseE/588sC+UYA= X-Gm-Gg: AeBDievXRUIugT07quMfbI0EcgHOqaf4b7ceR9Y6s6xm7YW6PgG3AnkKm8RG/p5oNBm awhnCq6aGTSL4INQtsGMzqjcreNYwuTq9bN/VarZDUxMeWD34x0pkmZAXGstqlO+MrSZVfDjVps /rFyV9dXCWAbBw7oVB7vMbkbRzooyH1w4vTjhZH2524hc9WLa1udIZPuErBhUre76wkrh/V+OL5 Au5b2C9JuBW1QnQt1xy9U8kaqrOSp+wql5IPrkui6RIIXRYQrob5hAfAB69DYWVHfkHNY85pA8r hqLrI10MWxCZAylVBIBuefWXwQwCe3K/ps6jhV/pErSWVw1ihriIR8WWtGBwHBdIfZEzef2VT0Q WHpR0h9eAJsk1mr7fxmQ6RcAx/sz8ifFkD2MCDicUX0x/TXNM1QAcaRwJ/AytjUMBGlfsobHMmv 7C+wDcO8U7VOUnfAfbyfpPv5yPkiXmbq/XJqO6N8wH X-Received: by 2002:a05:6102:5124:b0:5ff:e10e:b9fb with SMTP id ada2fe7eead31-63115de96d3mr336826137.4.1778116523607; Wed, 06 May 2026 18:15:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: jian he Date: Thu, 7 May 2026 09:14:47 +0800 X-Gm-Features: AVHnY4KPM4u6WQbgp1KluCtRM5r67sseCAVYlPxbXY4sBhW_5QUtNNRN9WS7u2Q Message-ID: Subject: Re: FOR PORTION OF does not recompute GENERATED STORED columns that depend on the range column To: Paul A Jungwirth Cc: Peter Eisentraut , SATYANARAYANA NARLAPURAM , PostgreSQL Hackers 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 Thu, May 7, 2026 at 1:13=E2=80=AFAM Paul A Jungwirth wrote: > > Sorry, I didn't have injection_points enabled, but now I see it too. > The attached v9 fixes it. > diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUt= ils.c index 1eb6b9f1f40..363830f0158 100644 --- a/src/backend/executor/execUtils.c +++ b/src/backend/executor/execUtils.c @@ -1408,6 +1408,7 @@ Bitmapset * ExecGetUpdatedCols(ResultRelInfo *relinfo, EState *estate) { RTEPermissionInfo *perminfo =3D GetResultRTEPermissionInfo(relinfo, estat= e); + Bitmapset *updatedCols =3D perminfo->updatedCols; if (perminfo =3D=3D NULL) ---------------------------------------------------- v8 crashes because in some cases, `perminfo` is NULL and we are ``perminfo->updatedCols;`` /* * If we don't have a ForPortionOfState yet, we must be a partition * child being hit for the first time. Make a copy from the root, w= ith * our own TupleTableSlot. We do this lazily so that we don't pay t= he * price of unused partitions. */ if ((((ModifyTable *) context.mtstate->ps.plan)->forPortionOf) && !resultRelInfo->ri_forPortionOf) { ExecInitForPortionOf(context.mtstate, estate, resultRelInfo); } the comment "partition child" seems not 100% accurate. Since we also need to consider table inheritance. Maybe replace it with "child table".