Re: Documentation improvements for partitioning

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Documentation improvements for partitioning
Date: 2017-02-15 04:31:56
Message-ID: CA+Tgmob+e+aTsM389VLCCf=r7NdbwfjuJfNEAXzFx2DJBVkMqQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 13, 2017 at 5:57 AM, Amit Langote
<Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> On 2017/02/13 14:21, Amit Langote wrote:
>> On 2017/02/10 19:19, Simon Riggs wrote:
>>> * The OID inheritance needs work - you shouldn't need to specify a
>>> partition needs OIDS if the parent has it already.
>>
>> That sounds right. It's better to keep the behavior same as for regular
>> inheritance. Will post a patch to get rid of the unnecessary check.
>>
>> FWIW, the check was added to prevent the command from succeeding in the
>> case where WITHOUT OIDS has been specified for a partition and the parent
>> partitioned table has the OID column. Regular inheritance simply
>> *overrides* the WITHOUT OIDS specification, which might be seen as surprising.
>
> 0001 of the attached patches takes care of this.

I think 0001 needs to remove this hunk of documentation:

<listitem>
<para>
If the partitioned table specified <literal>WITH OIDS</literal> then
each partition must also specify <literal>WITH OIDS</literal>. Oids
are not automatically inherited by partitions.
</para>
</listitem>

I think 0001 is better than the status quo, but I'm wondering whether
we should try to do something slightly different. Maybe it should
always work for the child table to specify neither WITH OIDS nor
WITHOUT OIDS, but if you do specify one of them then it has to be the
one that matches the parent partitioned table? With this patch, IIUC,
WITH OIDS is allowed only if the parent has the same, but WITHOUT OIDS
is allowed (but ignored) regardless of the parent setting.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-02-15 04:36:52 Re: pg_basebackup -R
Previous Message Haribabu Kommi 2017-02-15 03:53:44 Re: pg_stat_wal_write statistics view