Re: [HACKERS] Error while creating subscription when server isrunning in single user mode

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] Error while creating subscription when server isrunning in single user mode
Дата
Msg-id CAB7nPqQ10ZgJqh_ByUWFhgHpKMQj55=r=c9Z5PLE0Ehd249C5A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Error while creating subscription when server isrunning in single user mode  (Dilip Kumar <dilipbalaut@gmail.com>)
Ответы Re: [HACKERS] Error while creating subscription when server isrunning in single user mode  (Dilip Kumar <dilipbalaut@gmail.com>)
Список pgsql-hackers
On Wed, May 31, 2017 at 10:49 PM, Dilip Kumar <dilipbalaut@gmail.com> wrote:
> On Wed, May 31, 2017 at 2:20 PM, Michael Paquier
> <michael.paquier@gmail.com> wrote:
>> Yeah, see 0e0f43d6 for example. A simple fix is to look at
>> IsUnderPostmaster when creating, altering or dropping a subscription
>> in subscriptioncmds.c.
>
> Yeah, below patch fixes that.

Thanks, this looks correct to me at quick glance.

+    if (!IsUnderPostmaster)
+        ereport(FATAL,
+                (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+            errmsg("subscription commands are not supported by
single-user servers")));
The messages could be more detailed, like directly the operation of
CREATE/ALTER/DROP SUBCRIPTION in each error message. But that's a nit.
-- 
Michael



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

Предыдущее
От: "Tsunakawa, Takayuki"
Дата:
Сообщение: [HACKERS] Is ECPG's SET CONNECTION really not thread-aware?
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] TAP: allow overriding PostgresNode in get_new_node