Re: create subscription - improved warning message

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: create subscription - improved warning message
Date: 2022-10-11 06:30:37
Message-ID: CAHut+PtgkebavGYsGnROkY1=ULhJ5+yn4_i3Y9E9+yDeksqpwQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 11, 2022 at 2:46 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Mon, Oct 10, 2022 at 8:14 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >
> > Peter Smith <smithpb2250(at)gmail(dot)com> writes:
> > > On Mon, Oct 10, 2022 at 4:04 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> 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
> >
> > 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,
> >
> > HINT: To initiate replication, you must manually create the replication
> > slot, enable the subscription, and refresh the subscription.
> >
>
> LGTM.

PSA patch v3-0001 where the message/hint is worded as suggested above

> 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 are
> subscribed, and so after you enable the subscription nothing will be
> replicated. You will need to then run ALTER SUBSCRIPTION ... REFRESH
> PUBLICATION for tables to be subscribed."
>
> It doesn't say anything about manually creating the slot and probably
> the wording can be made similar.
>

PSA patch v3-0002 which changes CREATE SUBSCRIPTION pgdocs to use the
same wording as in the HINT message.

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

Attachment Content-Type Size
v3-0002-create-subscription-pgdocs.patch application/octet-stream 1.4 KB
v3-0001-create-subscription-warning-message.patch application/octet-stream 10.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2022-10-11 06:48:24 Re: Startup process on a hot standby crashes with an error "invalid memory alloc request size 1073741824" while replaying "Standby/LOCK" records
Previous Message Michael Paquier 2022-10-11 06:29:19 Re: Patch proposal: make use of regular expressions for the username in pg_hba.conf