Re: docs about FKs referencing partitioned tables

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: docs about FKs referencing partitioned tables
Date: 2019-05-29 05:33:26
Message-ID: 4cda4b9a-c421-4e87-b89f-a6e9c9352398@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2019/05/29 14:01, Paul A Jungwirth wrote:
> On Sun, May 26, 2019 at 7:49 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>> ... However you are adding a paragraph for something which is
>> completely unrelated to the issue we are trying to fix. If I were to
>> add something, I think that I would be more general than what you are
>> trying here and just mention a link to the previous paragraph about
>> the caveats of inheritance as they apply to single table members of an
>> inheritance tree and not a full set:
>> "Indexes and foreign key constraint apply to single tables and not
>> their inheritance children, hence they have some <link>caveats</> to
>> be aware of."
>
> That seems reasonable to me. Here is a patch file if that is helpful
> (minor typo corrected).

The patch looks good, thanks.

Michael commented upthread that the new next might be repeating what's
already said elsewhere. I did find that to be the case by looking at
5.10. Inheritance. For example, 5.10.1. Caveats says exactly the same thing:

A serious limitation of the inheritance feature is that indexes
(including unique constraints) and foreign key constraints only apply
to single tables, not to their inheritance children. This is true on
both the referencing and referenced sides of a foreign key constraint.

But couple of other points mentioned in 5.11.3.3. Caveats (of 5.11. Table
Partitioning) are already repeated in 5.10.1. Caveats; for example, note
the point about VACUUM, ANALYZE, INSERT ON CONFLICT, etc. applying to
single tables. So, perhaps it won't hurt to repeat the caveat about
indexes and foreign keys too.

Thanks,
Amit

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kohei KaiGai 2019-05-29 06:50:30 Re: How to know referenced sub-fields of a composite type?
Previous Message Paul A Jungwirth 2019-05-29 05:01:35 Re: docs about FKs referencing partitioned tables