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