Re: Declarative partitioning vs. sql_inheritance

From: David Fetter <david(at)fetter(dot)org>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Dmitry Ivanov <d(dot)ivanov(at)postgrespro(dot)ru>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Erik Rijkers <er(at)xs4all(dot)nl>, Amit Langote <amitlangote09(at)gmail(dot)com>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers-owner(at)postgresql(dot)org
Subject: Re: Declarative partitioning vs. sql_inheritance
Date: 2016-12-16 19:34:41
Message-ID: 20161216193441.GA12656@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 16, 2016 at 11:05:21AM -0500, Robert Haas wrote:
> On Thu, Dec 15, 2016 at 10:40 AM, Dmitry Ivanov <d(dot)ivanov(at)postgrespro(dot)ru> wrote:
> > Hi everyone,
> >
> > Looks like "sql_inheritance" GUC is affecting partitioned tables:
> >
> > [breaks literally everything]
> >
> > I might be wrong, but IMO this should not happen. Queries involving update,
> > delete etc on partitioned tables are basically broken. Moreover, there's no
> > point in performing such operations on a parent table that's supposed to be
> > empty at all times.
>
> An earlier version of Amit's patches tried to handle this by forcing
> sql_inheritance on for partitioned tables, but it wasn't
> well-implemented and I don't see the point anyway. Sure, turning
> off sql_inheritance off for partitioned tables produces stupid
> results. But turning off sql_inheritance for inheritance
> hierarchies also produces stupid results. If we were going to do
> anything about this, my vote would be to remove sql_inheritance.

+1

It occurs to me this probably isn't the only GUC that's basically just
a foot gun at this point.

Is 10 a good time to sweep and clear them?

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-12-16 20:15:42 Re: Declarative partitioning vs. sql_inheritance
Previous Message Pavel Stehule 2016-12-16 19:30:11 Re: proposal: session server side variables