Re: ToDo: show size of partitioned table

From: Mathias Brossard <mathias(at)brossard(dot)org>
To: pavel(dot)stehule(at)gmail(dot)com
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: ToDo: show size of partitioned table
Date: 2018-08-17 03:26:19
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-hackers

On Thu, Aug 16, 2018 at 12:46 AM Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>

> čt 16. 8. 2018 v 5:52 odesílatel Mathias Brossard <postgresql(at)zoinx(dot)org>
> napsal:
>> I do have a feedback on the implementation. The code tries to support
>> older PostgreSQL server versions when declarative partitions were not
>> supported before version 10 (relkind value of 'p'). Those versions will
>> never return any result from the query being built. So I would suggest an
>> early return from the function. The upside would be that the query building
>> would be simpler. I can make patch implementing that suggestion if you want.
> This is question - maybe we can support older partitioning based on only
> inheritance - and the query can be more exact on PostgreSQL 10 and newer.
> Please, send any patch. You are welcome.

In my very humble opinion, I would restrict the definition of partitions to
declarative partitioning. My justification would be that partitions all use
inheritance, but not all inheritance is a partition (how would you handle
multiple inheritance).

See patch attached that fails (in a way similar to other features) when
connected to servers with version earlier than 10.0.

-- Mathias Brossard

Attachment Content-Type Size
psql-dP-10+only.patch application/octet-stream 7.5 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-08-17 03:31:03 Re: Fix help option of contrib/oid2name
Previous Message Tatsuro Yamada 2018-08-17 03:19:42 Re: Fix help option of contrib/oid2name