Re: Feedback on table expansion hook (including patch)

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Erik Nordström <erik(at)timescale(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Feedback on table expansion hook (including patch)
Date: 2021-03-04 14:56:07
Message-ID: 05887153-7441-7150-45d7-c07400a431d4@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 07.05.20 10:11, Erik Nordström 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.

Unlike the get_relation_info_hook, your proposed hook would *replace*
expand_inherited_rtentry() rather than just tack on additional actions.
That seems awfully fragile. Could you do with a hook that does
additional things rather than replace a whole chunk of built-in code?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2021-03-04 15:00:49 Re: WIP: document the hook system
Previous Message gkokolatos 2021-03-04 14:47:18 Re: New default role- 'pg_read_all_data'