Re: [HACKERS] reload-through-the-top-parent switch the partition table
От | Rushabh Lathia |
---|---|
Тема | Re: [HACKERS] reload-through-the-top-parent switch the partition table |
Дата | |
Msg-id | CAGPqQf2OGxUNx1YY1QKjXjmGOG7J7e6=Ogvo2bqawbETUoWCUA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] reload-through-the-top-parent switch the partition table (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: [HACKERS] reload-through-the-top-parent switch the partition table
|
Список | pgsql-hackers |
On Wed, Aug 9, 2017 at 1:20 AM, Robert Haas <robertmhaas@gmail.com> wrote:
On Tue, Aug 8, 2017 at 8:48 AM, Rushabh Lathia <rushabh.lathia@gmail.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.
--
Rushabh Lathia
Вложения
В списке pgsql-hackers по дате отправления: