Re: create subscription - improved warning message

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: create subscription - improved warning message
Date: 2022-10-11 03:46:33
Message-ID: CAA4eK1+Eu_rBjkjq-DOKRPK6YOctFy947fS2xtRERqz+2XwwGQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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. 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.

[1] - https://www.postgresql.org/docs/devel/sql-createsubscription.html

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message kuroda.hayato@fujitsu.com 2022-10-11 03:54:01 RE: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Previous Message Nathan Bossart 2022-10-11 03:34:33 Re: subtransaction performance