Re: Feedback on table expansion hook (including patch)

From: Euler Taveira <euler(dot)taveira(at)2ndquadrant(dot)com>
To: Erik Nordström <erik(at)timescale(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Feedback on table expansion hook (including patch)
Date: 2020-09-16 02:14:56
Message-ID: CAH503wAExvZ+6aMHwspdVcA-8KUKNbxw2Bp542B5PrTCWvRJdQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 7 May 2020 at 05:11, Erik Nordström <erik(at)timescale(dot)com> wrote:

>
> I am looking for feedback on the possibility of adding a table expansion
> hook to PostgreSQL (see attached patch). The motivation for this is to
> allow extensions to optimize table expansion. In particular, TimescaleDB
> does its own table expansion in order to apply a number of optimizations,
> including partition pruning (note that TimescaleDB uses inheritance since
> PostgreSQL 9.6 rather than declarative partitioning ). There's currently no
> official hook for table expansion, but TimescaleDB has been using the
> get_relation_info hook for this purpose. Unfortunately, PostgreSQL 12 broke
> this for us since it moved expansion to a later stage where we can no
> longer control it without some pretty bad hacks. Given that PostgreSQL 12
> changed the expansion state of a table for the get_relation_info hook, we
> are thinking about this as a regression and are wondering if this could be
> considered against the head of PG 12 or maybe even PG 13 (although we
> realize feature freeze has been reached)?
>
>
I reviewed your patch and it looks good to me. You mentioned that it would
be useful for partitioning using table inheritance but it could also be
used for declarative partitioning (at least until someone decides to detach
it from inheritance infrastructure).

Unfortunately, you showed up late here. Even though the hook is a
straightforward feature, Postgres does not add new features to released
versions or after the feature freeze.

The only point that I noticed was that you chose "control over" but similar
code uses "control in".

--
Euler Taveira http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2020-09-16 02:16:35 Re: [Patch] Optimize dropping of relation buffers using dlist
Previous Message Amit Langote 2020-09-16 02:10:17 Re: pg_restore causing deadlocks on partitioned tables