Re: Logical Replication WIP

From: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
To: Steve Singer <steve(at)ssinger(dot)info>, Andres Freund <andres(at)anarazel(dot)de>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Erik Rijkers <er(at)xs4all(dot)nl>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers-owner(at)postgresql(dot)org
Subject: Re: Logical Replication WIP
Date: 2016-12-19 02:04:03
Message-ID: 085b9520-a46f-92bc-65fd-20c18d893402@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 18/12/16 19:02, Steve Singer wrote:
> On 12/18/2016 05:28 AM, Petr Jelinek wrote:
>> On 17/12/16 18:34, Steve Singer wrote:
>>> On 12/16/2016 07:49 AM, Petr Jelinek wrote:
>>> Yeah subscriptions are per database. I don't want to make v14 just
>>> for these 2 changes as that would make life harder for anybody
>>> code-reviewing the v13 so attached is diff with above fixes that
>>> applies on top of v13.
>>
>
>
> Thanks that fixes those issues.
>
> A few more I've noticed
>
>
> pg_dumping subscriptions doesn't seem to work
>
> ./pg_dump -h localhost --port 5441 --include-subscriptions test
> pg_dump: [archiver (db)] query failed: ERROR: missing FROM-clause entry
> for table "p"
> LINE 1: ...LECT rolname FROM pg_catalog.pg_roles WHERE oid = p.subowner...
> ^
> pg_dump: [archiver (db)] query was: SELECT s.tableoid, s.oid,
> s.subname,(SELECT rolname FROM pg_catalog.pg_roles WHERE oid =
> p.subowner) AS rolname, s.subenabled, s.subconninfo, s.subslotname,
> s.subpublications FROM pg_catalog.pg_subscription s WHERE s.subdbid =
> (SELECT oid FROM pg_catalog.pg_database WHERE datname
> = current_database())
>
> I have attached a patch that fixes this.
>

Thanks, merged.

> pg_dump is also generating warnings
>
> pg_dump: [archiver] WARNING: don't know how to set owner for object type
> SUBSCRIPTION
>
> I know that the plan is to add proper ACL's for publications and
> subscriptions later. I don't know if we want to leave the warning in
> until then or do something about it.
>

No, ACLs are separate from owner. This is thinko on my side. I was
thinking we can live without ALTER ... OWNER TO for now, but we actually
need it for pg_dump and for REASSIGN OWNED. So now I added the OWNER TO
for both PUBLICATION and SUBSCRIPTION.

>
> Also the tab-competion for create subscription doesn't seem to work as
> intended.
> I've attached a patch that fixes it and patches to add tab completion
> for alter publication|subscription
>

Merged as well.

Okay so now is the time for v14 I guess as more changes accumulated (I
also noticed missing doc for max_logical_replication_workers GUC).

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
0001-Add-PUBLICATION-catalogs-and-DDL-v14.patch.gz application/gzip 32.8 KB
0002-Add-SUBSCRIPTION-catalog-and-DDL-v14.patch.gz application/gzip 29.3 KB
0003-Define-logical-replication-protocol-and-output-plugi-v14.patch.gz application/gzip 12.8 KB
0004-Add-logical-replication-workers-v14.patch.gz application/gzip 42.7 KB
0005-Add-separate-synchronous-commit-control-for-logical--v14.patch.gz application/gzip 1.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2016-12-19 02:57:39 Retire src/backend/port/dynloader/linux.c ?
Previous Message Ryan Murphy 2016-12-19 01:18:31 Re: Trouble building uuid-ossp extension in new versions of Postgres