Re: partition tree inspection functions
От
Michael Paquier
Тема
Re: partition tree inspection functions
Дата
Msg-id
20181029035942.GG14242@paquier.xyz
Ответ на
Re: partition tree inspection functions (Amit Langote)
Список
Дерево обсуждения
partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Jesper Pedersen <jesper.pedersen@redhat.com>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Jesper Pedersen <jesper.pedersen@redhat.com>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Jesper Pedersen <jesper.pedersen@redhat.com>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Jesper Pedersen <jesper.pedersen@redhat.com>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Jesper Pedersen <jesper.pedersen@redhat.com>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Jesper Pedersen <jesper.pedersen@redhat.com>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Robert Haas <robertmhaas@gmail.com>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Jesper Pedersen <jesper.pedersen@redhat.com>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Jesper Pedersen <jesper.pedersen@redhat.com>
Re: partition tree inspection functions Thomas Munro <thomas.munro@enterprisedb.com>
Re: partition tree inspection functions Thomas Munro <thomas.munro@enterprisedb.com>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Jesper Pedersen <jesper.pedersen@redhat.com>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Jesper Pedersen <jesper.pedersen@redhat.com>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Pavel Stehule <pavel.stehule@gmail.com>
Re: partition tree inspection functions Robert Haas <robertmhaas@gmail.com>
Re: partition tree inspection functions Alvaro Herrera <alvherre@2ndquadrant.com>
Re: partition tree inspection functions Robert Haas <robertmhaas@gmail.com>
Re: partition tree inspection functions Jesper Pedersen <jesper.pedersen@redhat.com>
Re: partition tree inspection functions Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: partition tree inspection functions Michael Paquier <michael@paquier.xyz>
Re: partition tree inspection functions Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: partition tree inspection functions Dilip Kumar <dilipbalaut@gmail.com>
Re: partition tree inspection functions Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
On Fri, Oct 19, 2018 at 06:55:09PM +0900, Amit Langote wrote:
> Yeah, we could make it the responsibility of the callers of
> find_all_inheritors and find_inheritance_children to check relhassubclass
> as an optimization and remove any reference to relhassubclass from
> pg_inherits.c. Although we can write such a patch, it seems like it'd be
> bigger than the patch to ensure the correct value of relhassubclass for
> indexes, which I just posted on the other thread [1].
And what is present as patch 0001 on this thread has been committed as
55853d6, so we are good for this part.
>> Anyway, it seems that you are right here. Just setting relhassubclass
>> for partitioned indexes feels more natural with what's on HEAD now.
>> Even if I'd like to see all those hypothetical columns in pg_class go
>> away, that cannot happen without a close lookup at the performance
>> impact.
>
> Okay, I updated the patch on this thread.
Thanks for the new version.
> Since the updated patch depends on the correct value of relhassubclass
> being set for indexes, this patch should be applied on top of the other
> patch. I've attached here both.
- if (!has_subclass(parentrelId))
+ if (get_rel_relkind(parentrelId) != RELKIND_PARTITIONED_INDEX &&
+ !has_subclass(parentrelId))
return NIL;
You don't need this bit anymore, relhassubclass is now set for
partitioned indexes.
+ ereport(ERROR,
+ (errcode(ERRCODE_WRONG_OBJECT_TYPE),
+ errmsg("\"%s\" is not a table, a foreign table, or an index",
+ get_rel_name(rootrelid))));
Should this also list "partitioned tables and partitioned indexes"? The
style is heavy, but that maps with what pgstattuple does..
The tests should include also something for a leaf index when fed to
pg_partition_tree() (in order to control the index names you could just
attach an index to a partition after creating it, but I leave that up to
you).
+ pg_partition_tree(oid)
+ setof record
The change to regclass has not been reflected yet in the documentation
and the implementation, because...
> Another change I made is something Robert and Alvaro seem to agree about
> -- to use regclass instead of oid type as input/output columns.
... I am in minority here, it feels lonely ;)
--
Michael
В списке pgsql-hackers по дате отправления
От: Michael Paquier
Дата: