create subscription - improved warning message - Mailing list pgsql-hackers

From Peter Smith
Subject create subscription - improved warning message
Date
Msg-id CAHut+PvqdqOanheWSHDyhQiF+Z-7w=-+k4U+bwbT=b6YQ_hrXQ@mail.gmail.com
Whole thread Raw
Responses Re: create subscription - improved warning message  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
WARNING:  tables were not subscribed, you will have to run ALTER
SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables

~

When I first encountered the above CREATE SUBSCRIPTION warning message
I thought it was dubious-looking English...

On closer inspection I think the message has some other things that
could be improved:
a) it is quite long which IIUC is generally frowned upon
b) IMO most of the text it is more like a "hint" about what to do

~

PSA a patch which modifies this warning as follows:

BEFORE

test_sub=# create subscription sub1 connection 'host=localhost
port=test_pub' publication pub1 with (connect = false);
WARNING:  tables were not subscribed, you will have to run ALTER
SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables
CREATE SUBSCRIPTION

AFTER

test_sub=# create subscription sub1 connection 'host=localhost
port=test_pub' publication pub1 with (connect = false);
WARNING:  tables were not subscribed
HINT:  You will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION
to subscribe the tables.
CREATE SUBSCRIPTION

------
Kind Regards,
Peter Smith.
Fujitsu Australia

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: use has_privs_of_role() for pg_hba.conf
Next
From: Zheng Li
Date:
Subject: Re: Support logical replication of DDLs