Re: [patch] Have psql's \d+ indicate foreign partitions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [patch] Have psql's \d+ indicate foreign partitions
Date
Msg-id 2613631.1667666354@sss.pgh.pa.us
Whole thread Raw
In response to Re: [patch] Have psql's \d+ indicate foreign partitions  (Michael Paquier <michael@paquier.xyz>)
Responses Re: [patch] Have psql's \d+ indicate foreign partitions
List pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> On Mon, Oct 24, 2022 at 09:44:18PM +0900, Ian Lawrence Barwick wrote:
>> Recently I have been working a lot with partitioned tables which contain a mix
>> of local and foreign partitions, and find it would be very useful to be able to
>> easily obtain an overview of which partitions are foreign and where they are
>> located.

> Hmm.  I am not sure that we should add this much amount of
> information, particularly for the server bits.

FWIW, I am also in favor of adding ", FOREIGN" but no more.
My concern is that as submitted, the patch greatly increases
the cost of the underlying query by adding two more catalogs
to the join.  I don't think imposing such a cost on everybody
(whether they use foreign partitions or not) is worth that.  But
we can add ", FOREIGN" for free since we have the relkind anyway.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Schema variables - new implementation for Postgres 15
Next
From: Julien Rouhaud
Date:
Subject: Re: Schema variables - new implementation for Postgres 15