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 1lZeiF-00088x-Iv for pgsql-bugs@arkaria.postgresql.org; Thu, 22 Apr 2021 19:10:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lZeiE-0006FA-C0 for pgsql-bugs@arkaria.postgresql.org; Thu, 22 Apr 2021 19:10:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZeiE-0006Ed-5i for pgsql-bugs@lists.postgresql.org; Thu, 22 Apr 2021 19:10:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZeiA-0006kQ-UZ for pgsql-bugs@lists.postgresql.org; Thu, 22 Apr 2021 19:10:05 +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 13MJ9xsH1194024; Thu, 22 Apr 2021 15:09:59 -0400 From: Tom Lane To: Andres Freund cc: Amit Langote , David Steele , Pavel Biryukov <79166341370@yandex.ru>, PostgreSQL mailing lists Subject: Re: posgres 12 bug (partitioned table) In-reply-to: <20210422185724.z54trqb4j6oavwjv@alap3.anarazel.de> References: <407111603806900@mail.yandex.ru> <793243.1619032209@sss.pgh.pa.us> <1102101.1619115665@sss.pgh.pa.us> <20210422183148.xsopy2qsym7a7app@alap3.anarazel.de> <1130714.1619116646@sss.pgh.pa.us> <20210422185724.z54trqb4j6oavwjv@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Thu, 22 Apr 2021 11:57:24 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1194022.1619118599.1@sss.pgh.pa.us> Date: Thu, 22 Apr 2021 15:09:59 -0400 Message-ID: <1194023.1619118599@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > On 2021-04-22 14:37:26 -0400, Tom Lane wrote: >> OK, I could work with that. Shall we spell the error message the >> same as if it really were a virtual slot, or does it need to be >> different to avoid confusion? > Hm. Seems like it'd be better to have a distinct error message? Feels > like it'll often indicate separate issues whether a non-materialized > heap slot or a virtual slot has its system columns accessed. After thinking about it for a bit, I'm inclined to promote this to a user-facing error, and have all the slot types report ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("cannot retrieve a system column in this context"))); which is at least somewhat intelligible to end users. A developer trying to figure out why it happened would resort to \errverbose or more likely gdb in any case, so the lack of specificity doesn't seem like a problem. > Not entirely clear to me how we'd track whether we have valid system > column data or not once materialized - which I think is why we > historically had the cases where we returned bogus values. Right, but with this fix we won't need to materialize. regards, tom lane