From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Dilip Kumar <dilipbalaut(at)gmail(dot)com>, 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-02 01:42:41 |
Message-ID: | 123462dc-19b9-4df8-01cf-9faa677b0972@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 6/1/17 04:49, Dilip Kumar wrote:
> 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.
We should look at what the underlying problem is before we prohibit
anything at a high level.
When I try it, I get a
TRAP: FailedAssertion("!(event->fd != (-1))", File: "latch.c", Line: 861)
which might indicate that there is a more general problem with latch use
in single-user mode.
If I remove that assertion, things work fine after that. The originally
reported error "epoll_ctl() failed: Bad file descriptor" might indicate
that there is platform-dependent behavior.
I think the general problem is that the latch code that checks for
postmaster death does not handle single-user mode well.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2017-06-02 01:43:09 | Re: Patch: Add --no-comments to skip COMMENTs with pg_dump |
Previous Message | Robert Haas | 2017-06-02 01:38:41 | Re: logical replication busy-waiting on a lock |