Re: [COMMITTERS] pgsql: Implement table partitioning.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: [COMMITTERS] pgsql: Implement table partitioning.
Date: 2016-12-21 15:31:18
Message-ID: CA+TgmoaQLDUAdjBNe1hfSCj5SW+8HnsnDwTbGZUkSmHygG-V9w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Tue, Dec 20, 2016 at 12:22 PM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> Robert Haas wrote:
>> Implement table partitioning.
>
> I thought it was odd to use rd_rel->reloftype as a boolean in
> ATExecAttachPartition, but apparently we do it elsewhere too, so let's
> leave that complaint for another day.

Ugh. I agree - that's bad style.

> What I also found off in the same function is that we use
> SearchSysCacheCopyAttName() on each attribute and then don't free the
> result, and don't ever use the returned tuple either. A simple fix, I
> thought, just remove the "Copy" and add a ReleaseSysCache().

Or use SearchSysCachExists.

> But then I
> noticed this whole thing is rather strange -- why not pass a boolean
> flag down to CreateInheritance() and from there to
> MergeAttributesIntoExisting() to implement the check? That seems less
> duplicative.

Hmm, that would be another way to do it.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2016-12-21 16:15:07 pgsql: Fix corner-case bug in WaitEventSetWaitBlock on Windows.
Previous Message Robert Haas 2016-12-21 14:54:12 pgsql: Refactor merge path generation code.

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-12-21 15:38:13 Re: Parallel Index Scans
Previous Message David Fetter 2016-12-21 15:29:54 Re: pg_background contrib module proposal