Re: posgres 12 bug (partitioned table)

From: Pavel Biryukov <79166341370(at)yandex(dot)ru>
To: Amit Langote <amitlangote09(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: posgres 12 bug (partitioned table)
Date: 2020-10-27 13:55:17
Message-ID: 407111603806900@mail.yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

<div>Hi!</div><div> </div><div>What's the state with this issue?</div><div> </div><div>-- <br />С уважением, Павел</div><div> </div><div> </div><div> </div><div>13.08.2020, 07:13, "Amit Langote" &lt;amitlangote09(at)gmail(dot)com&gt;:</div><blockquote><p>Hi,<br /><br />On Thu, Aug 13, 2020 at 1:27 AM Andres Freund &lt;<a href="mailto:andres(at)anarazel(dot)de" rel="noopener noreferrer">andres(at)anarazel(dot)de</a>&gt; wrote:</p><blockquote> On 2020-08-12 14:19:12 +0900, Amit Langote wrote:<br /> &gt; On Wed, Aug 12, 2020 at 1:08 PM Tom Lane &lt;<a href="mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us" rel="noopener noreferrer">tgl(at)sss(dot)pgh(dot)pa(dot)us</a>&gt; wrote:<br /> &gt; &gt; It's not like we don't have a technology for doing that. The way this<br /> &gt; &gt; ideally would work, IMV, is that the parent partitioned table either<br /> &gt; &gt; has or doesn't have a given system column. If it does, then every<br /> &gt; &gt; child must too, just like the way things work for user columns.<br /> &gt;<br /> &gt; Ah, I may have misread "insisting that all partitions have a given<br /> &gt; system column" as doing that on every query, but maybe Andres meant<br /> &gt; what you are describing here.<br /><br /> I think Tom's formulation makes sense.</blockquote><p><br />Yes, I agree.<br /> </p><blockquote> &gt; &gt; This'd require (a) some sort of consensus about which kinds of system<br /> &gt; &gt; columns can make sense --- as Andres noted, 32-bit xmin might not be<br /> &gt; &gt; the best choice here --- and (b) some notation for users to declare<br /> &gt; &gt; which of these columns they want in a partitioned table. Once upon<br /> &gt; &gt; a time we had WITH OIDS, maybe that idea could be extended.<br /> &gt;<br /> &gt; For (a), isn't there already a consensus that all table AMs support at<br /> &gt; least the set of system columns described in 5.5 System Columns [1]<br /> &gt; even if the individual members of that set are no longer the best<br /> &gt; choice at this point?<br /><br /> I don't think there is. I don't think xmin/xmax/cmin/cmax should be<br /> among those. tableoid and ctid are handled by generic code, so I think<br /> they would be among the required columns.<br /><br /> Where do you see that concensus?</blockquote><p><br />Perhaps I was wrong to use the word consensus. I was trying to say<br />that table AM extensibility work didn't change the description in 5.5<br />System Columns, which still says *all* tables, irrespective of their<br />AM, implicitly have those columns, so I assumed we continue to ask AM<br />authors to have space for those columns in their tuples. Maybe, that<br />list is a legacy of heapam and updating it in am AM-agnostic manner<br />would require consensus.<br /> </p><blockquote> &gt; I do agree that we'd need (b) in some form to require AMs to fill<br /> &gt; those columns which it seems is not the case currently.<br /><br /> Hm? What are you referencing here?</blockquote><p><br />I meant that WITH &lt;a-system-column&gt; specified on a table presumably<br />forces an AM to ensure that the column is present in its tuples, like<br />WITH OIDS specification on a table would force heapam to initialize<br />the oid system column in all tuples being inserted into that table.<br />Lack of the same notation for other system columns means that AMs<br />don't feel forced to ensure those columns are present in their tuples.<br />Also, having the WITH notation makes it easy to enforce that all<br />partitions in a given hierarchy have AMs that respect the WITH<br />specification.<br /> </p>--<br />Amit Langote<br />EnterpriseDB: <a href="http://www.enterprisedb.com/" rel="noopener noreferrer">http://www.enterprisedb.com</a></blockquote>

Attachment Content-Type Size
unknown_filename text/html 3.7 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-10-27 23:38:08 Re: BUG #16671: "generated always as" is ignored when updating table through view
Previous Message Konstantin Knizhnik 2020-10-27 08:41:43 Re: Memory leak in RelationBuildRowSecurity

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2020-10-27 14:02:53 Re: Internal key management system
Previous Message Tom Lane 2020-10-27 13:51:16 Re: duplicate function oid symbols