Re: ToDo: show size of partitioned table - Mailing list pgsql-hackers

From Mathias Brossard
Subject Re: ToDo: show size of partitioned table
Date
Msg-id CAGsGC=EH16Y=Zua3RLf+aK_qHFv-ci_YsmiXV7zpTZOoTyYf-g@mail.gmail.com
Whole thread Raw
In response to Re: ToDo: show size of partitioned table  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: ToDo: show size of partitioned table
List pgsql-hackers
On Thu, Aug 16, 2018 at 12:46 AM Pavel Stehule <pavel.stehule@gmail.com> wrote:
čt 16. 8. 2018 v 5:52 odesílatel Mathias Brossard <postgresql@zoinx.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.

 Sincerely,
-- Mathias Brossard
Attachment

pgsql-hackers by date:

Previous
From: Tatsuro Yamada
Date:
Subject: Re: Fix help option of contrib/oid2name
Next
From: Michael Paquier
Date:
Subject: Re: Fix help option of contrib/oid2name