Re: partitioned tables and contrib/sepgsql

From: Mike Palmiotto <mike(dot)palmiotto(at)crunchydata(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: partitioned tables and contrib/sepgsql
Date: 2017-03-31 18:42:00
Message-ID: CAMN686HV-9X1JaAaSH5XcoLfaA6qGCrt6AA224YrevbOvi+Y6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 31, 2017 at 2:14 PM, Mike Palmiotto
<mike(dot)palmiotto(at)crunchydata(dot)com> wrote:
> On Mon, Mar 27, 2017 at 12:09 PM, Mike Palmiotto
> <mike(dot)palmiotto(at)crunchydata(dot)com> wrote:
>> On Mon, Mar 27, 2017 at 11:46 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>> <snip>
>>> Note that sepgsql hasn't been updated to work with RLS yet, either,
>>> but we didn't regard that as an open item for RLS, or if we did the
>>> resolution was just to document it. I am not opposed to giving a
>>> little more time to get this straightened out, but if a patch doesn't
>>> show up fairly soon then I think we should just document that sepgsql
>>> doesn't support partitioned tables in v10. sepgsql has a fairly
>>> lengthy list of implementation restrictions already, so one more is
>>> not going to kill anybody -- or if it will then that person should
>>> produce a patch soon.
>>
>> Okay, I'll make sure I get something fleshed out today or tomorrow.
>
> Apologies for the delay. I was waffling over whether to reference
> PartitionedRelationId in sepgsql, but ended up deciding to just handle
> RELKIND_PARTITIONED_TABLE and treat the classOid as
> RelationRelationId. Seeing as there is a relid in pg_class which
> corresponds to the partitioned table, this chosen route seemed
> acceptable.

Newest patches remove cruft from said waffling. No need to include
pg_partitioned_table.h if we're not referencing PartitionedRelationId.

>
> Here is a demonstration of the partitioned table working with sepgsql hooks:
> https://gist.github.com/anonymous/b10f476a95ae9cdd39b83ef872d4b1e6
>
> Attached you will find two patches, which were rebased on master as of
> 156d388 (applied with `git am --revert [patch file]`). The first gets
> rid of some pesky compiler warnings and the second implements the
> sepgsql handling of partitioned tables.

That should have read `git am --reject [patch file]`. Apologies for
the inaccuracy.

Thanks,

--
Mike Palmiotto
Software Engineer
Crunchy Data Solutions
https://crunchydata.com

Attachment Content-Type Size
0001-Silence-some-sepgsql-compiler-warnings.patch text/x-patch 2.2 KB
0002-Add-partitioned-table-support-to-sepgsql.patch text/x-patch 4.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-03-31 18:42:30 Re: Allow to specify #columns in heap/index_form_tuple
Previous Message Petr Jelinek 2017-03-31 18:38:01 Re: Somebody has not thought through subscription locking considerations