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 1k5WHo-0006xs-E7 for pgsql-bugs@arkaria.postgresql.org; Tue, 11 Aug 2020 15:34: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 1k5WHn-0006q2-Aq for pgsql-bugs@arkaria.postgresql.org; Tue, 11 Aug 2020 15:33:59 +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 1k5WHn-0006pv-4T for pgsql-bugs@lists.postgresql.org; Tue, 11 Aug 2020 15:33:59 +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 1k5WHk-000732-Rs for pgsql-bugs@lists.postgresql.org; Tue, 11 Aug 2020 15:33: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 07BFXqp93398358; Tue, 11 Aug 2020 11:33:52 -0400 From: Tom Lane To: Robert Haas cc: Pavel Biryukov <79166341370@yandex.ru>, PostgreSQL mailing lists , Andres Freund Subject: Re: posgres 12 bug (partitioned table) In-reply-to: References: <141051591267657@mail.yandex.ru> <1251598.1591289850@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Tue, 11 Aug 2020 11:21:10 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3398356.1597160032.1@sss.pgh.pa.us> Date: Tue, 11 Aug 2020 11:33:52 -0400 Message-ID: <3398357.1597160032@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > On Thu, Jun 4, 2020 at 12:57 PM Tom Lane wrote: >> Pavel Biryukov <79166341370@yandex.ru> writes: >>> Hello. I'm catch error "virtual tuple table slot does not have system >>> attributes" when inserting row into partitioned table with RETURNING >>> xmin > I wonder whether it's really correct to classify this as a bug. The > subsequent discussion essentially boils down to this: the partitioned > table's children could use any AM, and they might not all use the same > AM. The system columns that are relevant for the heap may therefore be > relevant to all, some, or none of the children. In fact, any fixed > kind of tuple table slot we might choose to use for the parent has > this problem. If all of the children are of the same type -- and today > that would have to be heap -- then using that type of tuple table slot > for the parent as well would make sense. But there's no real reason > why that's the correct answer in general. If the children are all of > some other type, using a heap slot for the parent is wrong; and if > they're all of different types, it's unclear that anything other than > a virtual slot makes any sense. Well, if we want to allow such scenarios then we need to forbid queries from accessing "system columns" of a partitioned table, much as we do for views. Failing way down inside the executor seems quite unacceptable. regards, tom lane