Re: Error while creating subscription when server is running in single user mode

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Error while creating subscription when server is running in single user mode
Date: 2017-06-01 08:49:46
Message-ID: CAFiTN-v4UUdia7jKrCnRR5cMXp=6Ou98yyO7Wg1BUwhGhcwt+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 1, 2017 at 1:02 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> 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.

Thanks for looking into it. Yeah, I think it's better to give
specific message instead of generic because we still support some of
the subscription commands even in single-user mode i.e ALTER
SUBSCRIPTION OWNER. My patch doesn't block this command and there is
no harm in supporting this in single-user mode but does this make any
sense? We may create some use case like creation subscription in
normal mode and then ALTER OWNER in single user mode but it makes
little sense to me.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
subscription_error_v1.patch application/octet-stream 1.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Khandekar 2017-06-01 11:41:07 Re: UPDATE of partition key
Previous Message Kuntal Ghosh 2017-06-01 08:44:59 Re: "create publication..all tables" ignore 'partition not supported' error