Re: Optimise default partition scanning while adding new partition

Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>

From: Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2017-09-14T08:03:52Z
Lists: pgsql-hackers

Attachments

Thanks Amit for reviewing.

Patch looks fine to me.  By the way, why don't we just say "Can we skip
> scanning part_rel?" in the comment before the newly added call to
> PartConstraintImpliedByRelConstraint()?  We don't need to repeat the
> explanation of what it does at the every place we call it.
>

I have changed the comment.
PFA.

Regards,
Jeevan Ladhe

Commits

  1. Synchronize error messages.

  2. On CREATE TABLE, consider skipping validation of subpartitions.

  3. On attach, consider skipping validation of subpartitions individually.

  4. Improve error message when skipping scan of default partition.

  5. Allow a partitioned table to have a default partition.