Re: pg_(total_)relation_size and partitioned tables - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: pg_(total_)relation_size and partitioned tables
Date
Msg-id 20180102140226.qen2d4tskjueryno@alvherre.pgsql
Whole thread Raw
In response to Re: pg_(total_)relation_size and partitioned tables  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: pg_(total_)relation_size and partitioned tables
List pgsql-hackers
Peter Eisentraut wrote:

> But what are the uses for dealing with partial partition hierarchies?
> How easy do we need to make that?

If you have multilevel partitioning, say partitions per year per site.
What is the volume of 2017 compared to 2016, on each site?  I don't
think it needs to be super easy, but it should be reasonable.

I think pg_partition_parent() should be a simple function doing one
catalog lookup (already implemented as get_partition_parent(),
but needs a "missing_ok" case), and pg_partition_root() an iterative
version of that.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Better testing coverage and unified coding for plpgsql loops
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] [Patch] Log SSL certificate verification errors