Re: no pg_hba.conf entry for replication connection from host - Mailing list pgsql-general

From Volkan Unsal
Subject Re: no pg_hba.conf entry for replication connection from host
Date
Msg-id CAMcqKm=Hebcr7WeGwV3i374d7SBoLLnA-pOv8H6dfHuM2ZP8mA@mail.gmail.com
Whole thread Raw
In response to Re: no pg_hba.conf entry for replication connection from host  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: no pg_hba.conf entry for replication connection from host
List 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.


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


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.klaver@aklaver.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@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.klaver@aklaver.com



--
Volkan Unsal
web and mobile development

pgsql-general by date:

Previous
From: Jukka Inkeri
Date:
Subject: Re: unexpected (to me) sorting order
Next
From: Adrian Klaver
Date:
Subject: Re: no pg_hba.conf entry for replication connection from host