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

From: Andres Freund <andres(at)anarazel(dot)de>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, 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:55:10
Message-ID: 20170602015510.xd6zi4jq4ldbclbn@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2017-06-01 21:42:41 -0400, Peter Eisentraut wrote:
> We should look at what the underlying problem is before we prohibit
> anything at a high level.

I'm not sure there's any underlying issue here, except being in single
user mode.

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

That just means that the latch isn't initialized. Which makes:

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

quite unsurprising. I'm not sure how this hints at platform dependent
behaviour?

libpqrcv_connect() uses MyProc->procLatch, which doesn't exist/isn't
initialized in single user mode. I'm very unclear why that code uses
MyProc->procLatch rather than MyLatch, but that'd not change anything -
the tablesync stuff etc would still not work.

- Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message wangchuanting 2017-06-02 01:59:32 Re: BUG #14680: startup process on standby encounter a deadlock of TwoPhaseStateLock when redo 2PC xlog
Previous Message Robert Haas 2017-06-02 01:43:09 Re: Patch: Add --no-comments to skip COMMENTs with pg_dump