Re: Logical Replication WIP

From: Steve Singer <steve(at)ssinger(dot)info>
To: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, 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-18 18:02:46
Message-ID: 5856CF46.6070104@ssinger.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

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.

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

Attachment Content-Type Size
0003-Fix-tab-complete-for-CREATE-SUBSCRIPTION.patch text/x-diff 1.1 KB
0002-Add-tab-complete-for-ALTER-SUBSCRIPTION.patch text/x-diff 1.7 KB
0001-Add-tab-complete-for-ALTER-PUBLICATION.patch text/x-diff 1.9 KB
0004-Fix-typo-for-column-name-when-dumping-subscriptions-.patch text/x-diff 953 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2016-12-18 21:30:51 Re: move collation import to backend
Previous Message Pavel Stehule 2016-12-18 15:27:54 Re: patch: function xmltable