Re: [patch] Have psql's \d+ indicate foreign partitions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Ian Lawrence Barwick <barwick(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [patch] Have psql's \d+ indicate foreign partitions
Date: 2022-11-05 16:39:14
Message-ID: 2613631.1667666354@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(at)paquier(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2022-11-05 17:25:09 Re: Schema variables - new implementation for Postgres 15
Previous Message Tomas Vondra 2022-11-05 16:04:31 Re: Schema variables - new implementation for Postgres 15