Re: transition table behavior with inheritance appears broken (was: Declarative partitioning - another take)

From: David Fetter <david(at)fetter(dot)org>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers-owner(at)postgresql(dot)org, Kevin Grittner <kgrittn(at)gmail(dot)com>
Subject: Re: transition table behavior with inheritance appears broken (was: Declarative partitioning - another take)
Date: 2017-05-03 16:26:17
Message-ID: 20170503162617.GJ14241@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 03, 2017 at 11:47:04AM -0400, Robert Haas wrote:
> On Tue, May 2, 2017 at 9:44 PM, Thomas Munro
> <thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> > I think that we should only capture transition tuples captured from
> > the explicitly named relation, since we only fire AFTER STATEMENT
> > triggers on that relation. I see no inconsistency with the policy of
> > rejecting transition tables on partitioned tables (as I proposed and
> > Kevin accepted[1]), because partitioned tables can't have any data so
> > there would be no point. In contrast, every parent table in an
> > inheritance hierarchy is also a regular table and can hold data, so I
> > think we should allow transition tables on them, and capture
> > transition tuples from that table only when you modify it directly.
>
> I suspect that most users would find it more useful to capture all of
> the rows that the statement actually touched, regardless of whether
> they hit the named table or an inheritance child. I just don't know
> if it's practical to make that work. (And, of course, I don't know if
> other people agree with my assessment of what is useful ... but
> generally there seems to be support for making partitioned tables, at
> least, look more like a single table that happens to have partitions
> and less like a bunch of separate tables attached to each other with
> duct tape.)

+1 on the not-duct-tape view of partitioned tables.

Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-05-03 16:27:03 Re: Cost of src/test/recovery and .../subscription tests
Previous Message Robert Haas 2017-05-03 16:20:08 Re: transition table behavior with inheritance appears broken (was: Declarative partitioning - another take)