pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Pavel Biryukov <79166341370@yandex.ru>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: posgres 12 bug (partitioned table)
Date: Wed, 12 Aug 2020 00:08:10 -0400
Message-ID: <81885.1597205290@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+HiwqH7bA+orwhcA5dofKR_UNzk-S8GPK23g1vCrWxAjnK=Og@mail.gmail.com>
References: <141051591267657@mail.yandex.ru>
	<1251598.1591289850@sss.pgh.pa.us>
	<20200811180231.fcssvhelqpnydnx7@alap3.anarazel.de>
	<CA+HiwqH7bA+orwhcA5dofKR_UNzk-S8GPK23g1vCrWxAjnK=Og@mail.gmail.com>

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





view thread (46+ messages)  latest in thread

Message-ID: <81885.1597205290@sss.pgh.pa.us>
Permalink:  ../81885.1597205290@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/81885.1597205290@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, amitlangote09@gmail.com, andres@anarazel.de, 79166341370@yandex.ru, pgsql-bugs@lists.postgresql.org
  Subject: Re: posgres 12 bug (partitioned table)
  In-Reply-To: <81885.1597205290@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox