Re: create subscription - improved warning message

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: create subscription - improved warning message
Дата
Msg-id 3175789.1665156217@sss.pgh.pa.us
обсуждение исходный текст
Ответ на create subscription - improved warning message  (Peter Smith <smithpb2250@gmail.com>)
Ответы Re: create subscription - improved warning message
Список pgsql-hackers
Peter Smith <smithpb2250@gmail.com> 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 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

You're quite right about both of those points, but I think there's
even more to criticize: "tables were not subscribed" is a basically
useless message, and probably not even conceptually accurate.
Looking at the code, I think the situation being complained of is that
we have created the subscription's main catalog entries locally, but
since we were told not to connect to the publisher, we don't know what
tables the subscription is supposed to be reading.  I'm not sure what
the consequences of that are: do we not read any data at all yet, or
what?

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.

Thoughts?

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Convert macros to static inline functions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Avoid mix char with bool type in comparisons