Re: posgres 12 bug (partitioned table)
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Andres Freund <andres@anarazel.de>,
Pavel Biryukov <79166341370@yandex.ru>,
PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2020-08-12T04:08:10Z
Lists: pgsql-bugs, pgsql-hackers
Amit Langote <amitlangote09@gmail.com> writes: > On Wed, Aug 12, 2020 at 3:02 AM Andres Freund <andres@anarazel.de> wrote: >> Medium term I think we should just plain out forbid references to system >> columns in partioned tables Or at least insist that all partitions have >> that column. > Performance-wise I would prefer the former, because the latter would > involve checking *all* partitions statically in the INSERT case, > something that we've avoided doing so far. 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. 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. I'm not entirely sure that this is worth all the trouble, but that's how I'd sketch doing it. regards, tom lane
Commits
-
Don't crash on reference to an un-available system column.
- d479d0028525 14.0 landed
- 2602ee4689c7 13.3 landed
- 05ce4bf8b1d4 12.7 landed