Re: no pg_hba.conf entry for replication connection from host

From: Volkan Unsal <spocksplanet(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Melvin Davidson <melvin6925(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: no pg_hba.conf entry for replication connection from host
Date: 2015-04-10 19:34:33
Message-ID: CAMcqKm=Hebcr7WeGwV3i374d7SBoLLnA-pOv8H6dfHuM2ZP8mA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Adrian,

I think there are some commands that are being run in single user mode,
which is why we are seeing these lines in the output.

https://gist.github.com/volkanunsal/1778cf691223e77f2e30#file-master-log-L57-L58

But I believe the server itself is started in the interactive mode (if
that's the right term for it) because immediately after those lines, you
also see this

https://gist.github.com/volkanunsal/1778cf691223e77f2e30#file-master-log-L59-L61

My tests showed there are no LOG outputs if the server was started in the
single user mode.

On Fri, Apr 10, 2015 at 3:15 PM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 04/10/2015 12:06 PM, Volkan Unsal wrote:
>
>> Hi Adrian,
>>
>> I didn't realize stand-alone was the same thing as single-user mode ––
>> are you sure? I guess I don't know what the alternative is to "a
>> stand-alone backend."
>>
>
> As example:
>
> postgres(at)killi:~> /usr/local/pgsql94/bin/postgres --single -D
> /usr/local/pgsql94/data/ postgres
>
> PostgreSQL stand-alone backend 9.4rc1
> backend>
>
> Your log entries in the second Gist match the command you have in
> init-master.sh in your first Gist.
>
>
> The alternative is either to use a system script to start Postgres or
> pg_ctl:
>
> http://www.postgresql.org/docs/9.3/interactive/app-pg-ctl.html
>
>
>> The server is started using a straightforward call to "postgres". It's
>> not using the --single flag, which is what I assume is needed for the
>> single-user mode.
>>
>
>
> No, single-user mode is a special case for recovering from mistakes:
>
> http://www.postgresql.org/docs/9.3/interactive/app-postgres.html
>
> The postgres command can also be called in single-user mode. The primary
> use for this mode is during bootstrapping by initdb. Sometimes it is used
> for debugging or disaster recovery; note that running a single-user server
> is not truly suitable for debugging the server, since no realistic
> interprocess communication and locking will happen. When invoked in
> single-user mode from the shell, the user can enter queries and the results
> will be printed to the screen, but in a form that is more useful for
> developers than end users. In the single-user mode, the session user will
> be set to the user with ID 1, and implicit superuser powers are granted to
> this user. This user does not actually have to exist, so the single-user
> mode can be used to manually recover from certain kinds of accidental
> damage to the system catalogs.
>
>
> In the Gist I do not see a call to postgres by itself. I only see with
> --single.
>
>
>>
>>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>

--
*Volkan Unsal*
*web and mobile development*
volkanunsal.com <http://bit.ly/1h1ebjy>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-04-10 19:51:36 Re: no pg_hba.conf entry for replication connection from host
Previous Message Adrian Klaver 2015-04-10 19:15:56 Re: no pg_hba.conf entry for replication connection from host