Re: create subscription - improved warning message

2022-11-02 Thread Peter Smith
On Wed, Nov 2, 2022 at 9:02 PM Amit Kapila wrote: > > On Wed, Oct 19, 2022 at 10:10 AM Peter Smith wrote: > > > > Thanks for your testing. > > > > LGTM so pushed with a minor change in one of the titles in the Examples > section. > Thanks for pushing. -- Kind Regards, Peter Smith. Fujitsu

Re: create subscription - improved warning message

2022-11-02 Thread Amit Kapila
On Wed, Oct 19, 2022 at 10:10 AM Peter Smith wrote: > > Thanks for your testing. > LGTM so pushed with a minor change in one of the titles in the Examples section. -- With Regards, Amit Kapila.

Re: create subscription - improved warning message

2022-10-18 Thread Peter Smith
On Wed, Oct 19, 2022 at 2:44 PM shiy.f...@fujitsu.com wrote: > ... > > +test_sub=# CREATE SUBSCRIPTION sub1 > +test_sub-# CONNECTION 'host=localhost dbname=test_pub' > +test_sub-# PUBLICATION pub1 > +test_sub-# WITH (slot_name=NONE, enabled=false, create_slot=false); > +WARNING: subscription was

RE: create subscription - improved warning message

2022-10-18 Thread shiy.f...@fujitsu.com
On Tue, Oct 18, 2022 5:44 PM Peter Smith wrote: > > On Mon, Oct 17, 2022 at 7:11 PM shiy.f...@fujitsu.com > wrote: > > > ... > > > > Thanks for your patch. Here are some comments. > > > > In Example 2, the returned slot_name should be "myslot". > > > > +test_pub=# SELECT * FROM pg_create_logical

Re: create subscription - improved warning message

2022-10-18 Thread Peter Smith
On Mon, Oct 17, 2022 at 7:11 PM shiy.f...@fujitsu.com wrote: > ... > > Thanks for your patch. Here are some comments. > > In Example 2, the returned slot_name should be "myslot". > > +test_pub=# SELECT * FROM pg_create_logical_replication_slot('myslot', > 'pgoutput'); > + slot_name |lsn > +--

Re: create subscription - improved warning message

2022-10-18 Thread Peter Smith
Thanks for the feedback. On Mon, Oct 17, 2022 at 10:14 PM Amit Kapila wrote: > > On Mon, Oct 17, 2022 at 7:17 AM Peter Smith wrote: > > > > > > Updated as sugggested. > > > > + > +Sometimes, either by choice (e.g. create_slot = > false), > +or by necessity (e.g. connect = false), the

Re: create subscription - improved warning message

2022-10-17 Thread Amit Kapila
On Mon, Oct 17, 2022 at 7:17 AM Peter Smith wrote: > > > Updated as sugggested. > + +Sometimes, either by choice (e.g. create_slot = false), +or by necessity (e.g. connect = false), the remote +replication slot is not created automatically during +CREATE SUBSCRIPTION. In these

RE: create subscription - improved warning message

2022-10-17 Thread shiy.f...@fujitsu.com
On Mon, Oct 17, 2022 9:47 AM Peter Smith wrote: > > On Sun, Oct 16, 2022 at 12:14 AM Amit Kapila > wrote: > > > > On Fri, Oct 14, 2022 at 8:22 AM Peter Smith > wrote: > > > > > > On Thu, Oct 13, 2022 at 9:07 AM Peter Smith > wrote: > > > > > ... > > > PSA a patch for adding examples of how to

Re: create subscription - improved warning message

2022-10-16 Thread Peter Smith
On Sun, Oct 16, 2022 at 12:14 AM Amit Kapila wrote: > > On Fri, Oct 14, 2022 at 8:22 AM Peter Smith wrote: > > > > On Thu, Oct 13, 2022 at 9:07 AM Peter Smith wrote: > > > ... > > PSA a patch for adding examples of how to activate a subscription that > > was originally created in a disconnected

Re: create subscription - improved warning message

2022-10-15 Thread Amit Kapila
On Fri, Oct 14, 2022 at 8:22 AM Peter Smith wrote: > > On Thu, Oct 13, 2022 at 9:07 AM Peter Smith wrote: > > > > On Thu, Oct 13, 2022 at 2:01 AM Tom Lane wrote: > > > > > > Alvaro Herrera writes: > > > > On 2022-Oct-12, Amit Kapila wrote: > > > >> Okay, then I think we can commit the last erro

Re: create subscription - improved warning message

2022-10-13 Thread Peter Smith
On Thu, Oct 13, 2022 at 9:07 AM Peter Smith wrote: > > On Thu, Oct 13, 2022 at 2:01 AM Tom Lane wrote: > > > > Alvaro Herrera writes: > > > On 2022-Oct-12, Amit Kapila wrote: > > >> Okay, then I think we can commit the last error message patch of Peter > > >> [1] as we have an agreement on the s

Re: create subscription - improved warning message

2022-10-12 Thread Amit Kapila
On Wed, Oct 12, 2022 at 8:31 PM Tom Lane wrote: > > Alvaro Herrera writes: > > On 2022-Oct-12, Amit Kapila wrote: > >> Okay, then I think we can commit the last error message patch of Peter > >> [1] as we have an agreement on the same, and then work on this as a > >> separate patch. What do you t

Re: create subscription - improved warning message

2022-10-12 Thread Peter Smith
On Thu, Oct 13, 2022 at 2:01 AM Tom Lane wrote: > > Alvaro Herrera writes: > > On 2022-Oct-12, Amit Kapila wrote: > >> Okay, then I think we can commit the last error message patch of Peter > >> [1] as we have an agreement on the same, and then work on this as a > >> separate patch. What do you t

Re: create subscription - improved warning message

2022-10-12 Thread Tom Lane
Alvaro Herrera writes: > On 2022-Oct-12, Amit Kapila wrote: >> Okay, then I think we can commit the last error message patch of Peter >> [1] as we have an agreement on the same, and then work on this as a >> separate patch. What do you think? > No objection. Yeah, the v3-0001 patch is fine. I a

Re: create subscription - improved warning message

2022-10-12 Thread Alvaro Herrera
On 2022-Oct-12, Amit Kapila wrote: > Okay, then I think we can commit the last error message patch of Peter > [1] as we have an agreement on the same, and then work on this as a > separate patch. What do you think? No objection. -- Álvaro HerreraBreisgau, Deutschland — https://www.Ent

Re: create subscription - improved warning message

2022-10-12 Thread Amit Kapila
On Wed, Oct 12, 2022 at 2:08 PM Alvaro Herrera wrote: > > On 2022-Oct-12, Amit Kapila wrote: > > > I think it is a good idea to expand the docs for this but note that > > there are multiple places that use a similar description. For example, > > see the description slot_name option: "When slot_nam

Re: create subscription - improved warning message

2022-10-12 Thread Alvaro Herrera
On 2022-Oct-12, Amit Kapila wrote: > I think it is a good idea to expand the docs for this but note that > there are multiple places that use a similar description. For example, > see the description slot_name option: "When slot_name is set to NONE, > there will be no replication slot associated w

Re: create subscription - improved warning message

2022-10-12 Thread Amit Kapila
On Wed, Oct 12, 2022 at 12:34 PM Alvaro Herrera wrote: > > On 2022-Oct-11, Peter Smith wrote: > > > > BTW, do we want to slightly adjust the documentation for the > > > connect option on CREATE SUBSCRIPTION page [1]? It says: "Since no > > > connection is made when this option is false, no tables

Re: create subscription - improved warning message

2022-10-12 Thread Amit Kapila
On Tue, Oct 11, 2022 at 4:27 PM Alvaro Herrera wrote: > > On 2022-Oct-10, Peter Smith wrote: > > > On Mon, Oct 10, 2022 at 4:04 PM Amit Kapila wrote: > > > > I think the below gives accurate information: > > > WARNING: subscription was created, but is not connected > > > HINT: You should create t

Re: create subscription - improved warning message

2022-10-12 Thread Alvaro Herrera
On 2022-Oct-11, Peter Smith wrote: > On Tue, Oct 11, 2022 at 2:46 PM Amit Kapila wrote: > > > > On Mon, Oct 10, 2022 at 8:14 PM Tom Lane wrote: > > > It feels a little strange to me that we describe two steps rather > > > vaguely and then give exact SQL for the third step. How about, > > > say

Re: create subscription - improved warning message

2022-10-11 Thread Alvaro Herrera
On 2022-Oct-10, Peter Smith wrote: > On Mon, Oct 10, 2022 at 4:04 PM Amit Kapila wrote: > > I think the below gives accurate information: > > WARNING: subscription was created, but is not connected > > HINT: You should create the slot manually, enable the subscription, > > and run %s to initiate

Re: create subscription - improved warning message

2022-10-10 Thread Peter Smith
On Tue, Oct 11, 2022 at 2:46 PM Amit Kapila wrote: > > On Mon, Oct 10, 2022 at 8:14 PM Tom Lane wrote: > > > > Peter Smith writes: > > > On Mon, Oct 10, 2022 at 4:04 PM Amit Kapila > > > wrote: > > >> I think the below gives accurate information: > > >> WARNING: subscription was created, but i

Re: create subscription - improved warning message

2022-10-10 Thread Amit Kapila
On Mon, Oct 10, 2022 at 8:14 PM Tom Lane wrote: > > Peter Smith writes: > > On Mon, Oct 10, 2022 at 4:04 PM Amit Kapila wrote: > >> I think the below gives accurate information: > >> WARNING: subscription was created, but is not connected > >> HINT: You should create the slot manually, enable th

Re: create subscription - improved warning message

2022-10-10 Thread Tom Lane
Peter Smith writes: > On Mon, Oct 10, 2022 at 4:04 PM Amit Kapila wrote: >> I think the below gives accurate information: >> WARNING: subscription was created, but is not connected >> HINT: You should create the slot manually, enable the subscription, >> and run %s to initiate replication. > +1

Re: create subscription - improved warning message

2022-10-10 Thread Robert Haas
On Mon, Oct 10, 2022 at 12:41 AM Tom Lane wrote: > I'm beginning to question the entire premise here. That is, > rather than tweaking this message until it's within hailing > distance of sanity, why do we allow the no-connect case at all? That sounds pretty nuts to me, because of the pg_dump use

Re: create subscription - improved warning message

2022-10-10 Thread Peter Smith
On Mon, Oct 10, 2022 at 4:04 PM Amit Kapila wrote: > > On Mon, Oct 10, 2022 at 10:10 AM Tom Lane wrote: > > > > Amit Kapila writes: ... > The docs say [1]: "When creating a subscription, the remote host is > not reachable or in an unclear state. In that case, the subscription > can be created us

Re: create subscription - improved warning message

2022-10-09 Thread Amit Kapila
On Mon, Oct 10, 2022 at 10:10 AM Tom Lane wrote: > > Amit Kapila writes: > > Yeah, this message looks better than the current one. However, when I > > tried to do what HINT says, it doesn't initiate replication. It gives > > me the below error: > > > postgres=# Alter subscription sub1 refresh pub

Re: create subscription - improved warning message

2022-10-09 Thread Tom Lane
Amit Kapila writes: > Yeah, this message looks better than the current one. However, when I > tried to do what HINT says, it doesn't initiate replication. It gives > me the below error: > postgres=# Alter subscription sub1 refresh publication; > ERROR: ALTER SUBSCRIPTION ... REFRESH is not allow

Re: create subscription - improved warning message

2022-10-09 Thread Amit Kapila
On Mon, Oct 10, 2022 at 4:40 AM Peter Smith wrote: > > But if it's OK to do that then: > - maybe it should mention the connection since the connect=false was > what caused this warning. > - maybe saying 'replication' instead of 'collection of data' would be > more consistent with the pgdocs for CR

Re: create subscription - improved warning message

2022-10-09 Thread Tom Lane
Peter Smith writes: > On Sat, Oct 8, 2022 at 2:23 AM Tom Lane wrote: >> I think maybe a better message would be along the lines of >> WARNING: subscription was created, but is not up-to-date >> HINT: You should now run %s to initiate collection of data. > [ how about ] > WARNING: subscription wa

Re: create subscription - improved warning message

2022-10-09 Thread Peter Smith
On Sat, Oct 8, 2022 at 2:23 AM Tom Lane wrote: > > Peter Smith writes: > > 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 i

Re: create subscription - improved warning message

2022-10-07 Thread Tom Lane
Peter Smith writes: > 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 th

create subscription - improved warning message

2022-10-06 Thread Peter Smith
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 oth