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 1nG2xA-0003YE-1z for pgsql-bugs@arkaria.postgresql.org; Fri, 04 Feb 2022 18:05:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nG2x8-0004YX-Rr for pgsql-bugs@arkaria.postgresql.org; Fri, 04 Feb 2022 18:04:58 +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 1nG2x8-0004YN-Jc for pgsql-bugs@lists.postgresql.org; Fri, 04 Feb 2022 18:04:58 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nG2x6-0007OH-47 for pgsql-bugs@lists.postgresql.org; Fri, 04 Feb 2022 18:04:58 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 214I4jpd415298; Fri, 4 Feb 2022 13:04:45 -0500 From: Tom Lane To: Maxim Gasumyants cc: pgsql-bugs@lists.postgresql.org Subject: Re: Generated column and partitioning bug In-reply-to: <95418DF5-D567-4FFC-A77A-DCE9B985692F@gasumyants.com> References: <95418DF5-D567-4FFC-A77A-DCE9B985692F@gasumyants.com> Comments: In-reply-to Maxim Gasumyants message dated "Fri, 04 Feb 2022 14:22:35 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <415296.1643997885.1@sss.pgh.pa.us> Date: Fri, 04 Feb 2022 13:04:45 -0500 Message-ID: <415297.1643997885@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Maxim Gasumyants writes: > I am running latest release of PostgreSQL 12. Are you certain it's the latest? This looks suspiciously like some Var-numbering bugs we fixed a year or so ago. I failed to reproduce any problem in 12.9 on the basis of the info you supplied. I suppose that there might be some additional conditions needed, like a dropped column in the parent table, but experimentation didn't find it. It might be useful to show the results of select attname, attnum, attisdropped from pg_attribute where attrelid = 'products_product_offers'::regclass and attnum > 0; Also, if you can make a self-contained SQL script that exhibits the problem for you, that would be very useful. regards, tom lane