pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: jayknowsunix@gmail.com
To: Doiron, Daniel <DoironD@advisory.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: A local replication entry
Date: Wed, 29 Oct 2014 09:50:44 -0400
Message-ID: <340AC30B-9188-44E5-8BC9-BBDB715EEF83@gmail.com> (raw)
In-Reply-To: <3A8E2AE3D7AFB44F89EA82A873FBE4E655988BBE@DC-MBOX1.advisory.com>
References: <5450E937.2070408@gmail.com>
	<3A8E2AE3D7AFB44F89EA82A873FBE4E655988BBE@DC-MBOX1.advisory.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Daniel,

Thanks for the reply. I don't think psql would diagnose this as it wouldn't use a replication connection, just a standard one. That is unless there is a way to force a replication connection through psql, and I just don't know it. As it is, the postgres user has no issues getting in with psql, as in "psql csg_db" with no other options specified.

I'm almost certain that my /etc/hosts file is up to date and I see all three of my db servers in it. There are no IPv6 entries in it at any event,

Sent from my iPad

> On Oct 29, 2014, at 9:43 AM, "Doiron, Daniel" <DoironD@advisory.com> wrote:
> 
> Do you get the same error using psql client? 
> 
> If so, do you see more connection details in the log? Is your /etc/hosts configured to resolve correctly? (I've had rogue sysadmins configure my servers to resolve to strange things like IPv6)
> 
> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of John Scalia
> Sent: Wednesday, October 29, 2014 9:19 AM
> To: pgsql-admin@postgresql.org
> Subject: [ADMIN] A local replication entry
> 
> I think maybe it's just too early in the morning for me, but I can't seem to get a local entry for replication working. I'm trying to create a script for hourly backups using pg_basebackup, and here's the command I'm using:
> 
> /usr/pgsql-9.3/bin/pg_basebackup -D - -Ft -z -c fast -l hourly.backup > backup_file.gz
> 
> The entry in the pg_hba.conf file is:
> 
> local    replication    postgres                            trust
> 
> And the error is: FATAL: no pg_hba.conf entry for replication connection from host "[local]", user "postgres", SSL off, but I have gotten this to work only if I use a "-h 10.10.1.129" option for the command. This only works since another entry in the pg_hba.conf satisfies the command.
> 
> Do I have an error with the local entry? Or are local entries even allowed for replication? As this has to be automatically deployed to various servers, I'd prefer to NOT specify each host's IP address both in pg_hba.conf file and in the script calling the pg_basebackup command. Oh, and at some point when this starts working, I am going to change the user from postgres to another without superuser capability.
> --
> Jay
> 
> 
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (14+ messages)  latest in thread

Message-ID: <340AC30B-9188-44E5-8BC9-BBDB715EEF83@gmail.com>
Permalink:  ../340AC30B-9188-44E5-8BC9-BBDB715EEF83@gmail.com/
Also on:    postgresql.org/message-id/340AC30B-9188-44E5-8BC9-BBDB715EEF83@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: jayknowsunix@gmail.com, DoironD@advisory.com
  Subject: Re: A local replication entry
  In-Reply-To: <340AC30B-9188-44E5-8BC9-BBDB715EEF83@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox