From: | Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: reload-through-the-top-parent switch the partition table |
Date: | 2017-08-10 07:47:21 |
Message-ID: | CAGPqQf2OGxUNx1YY1QKjXjmGOG7J7e6=Ogvo2bqawbETUoWCUA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Aug 9, 2017 at 1:20 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Tue, Aug 8, 2017 at 8:48 AM, Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>
> wrote:
> > It seems like with we set the numParents and parents only for the
> > dumpable objects (flagInhTables()). Current patch relies on the
> numParents
> > and parents to get the root partition TableInfo, but when --schema is
> been
> > specified - it doesn't load those information for the object which is not
> > dumpable.
> >
> > Now one options is:
> >
> > 1) restrict the --load-via-partition-root to be used with
> > the --schema or may be some other options - where we restrict the
> > objects.
> >
> > Consider this, partition root is in schema 'a' and the partition table
> is in
> > schema 'b', if someone specify the --schema b with
> > --load-via-partition-root,
> > I think we should not do "INSERT INTO a.tab" to load the data (because
> > user specified --schema b).
> >
> > 2) fix flagInhTables() to load the numParents and the parents information
> > for the partition table (can be checked using ispartition), irrespective
> of
> > whether object is dumpable is true or not.
>
> (1) seems like a pretty arbitrary restriction, so I don't like that
> option. (2) would hurt performance in some use cases. Do we have an
> option (3)?
>
How about protecting option 2) with the load-via-partition-root protection.
Means
load the parents information even dump is not set only when
load-via-partition-root
& ispartition.
This won't hurt performance for the normal cases.
Attaching the patch.
>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
--
Rushabh Lathia
Attachment | Content-Type | Size |
---|---|---|
load_via_partition_root_v3.patch | text/x-patch | 10.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2017-08-10 07:50:32 | Re: Creating backup history files for backups taken from standbys |
Previous Message | Masahiko Sawada | 2017-08-10 07:45:18 | Re: Creating backup history files for backups taken from standbys |