Skip site navigation (1) Skip section navigation (2)

postgres 9 bind address for replication

From: Adam Crews <adam(dot)crews(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: postgres 9 bind address for replication
Date: 2012-07-19 20:56:48
Message-ID: CAK=eFMxeCWinCgCDXXLkwhnsvcDhOw0d2gfw5gu4Y+Nf-yp+zw@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-cluster-hackerspgsql-generalpgsql-hackers
Hello,

I’m using pg 9.1.3 on CentOS 5 and have a few slave databases setup
using the built in streaming replication.

On the slaves I set the “listen_addresses” config option to an ip
address for a virtual alias on my network interfaces.  The host has an
address of 10.1.1.10, and there is a virtual alias of 10.1.1.40 that
the slave postmaster binds to.

When the slave makes it connection to the master to start replication
the source address for the connection is the host address, not the
virtual alias address.  Connections appear to come from 10.1.1.10,
instead of the slave postmaster address of 10.1.1.40.

This seems like a bug to me.  I could understand that if the
postmaster is listening on all interfaces, then it should use whatever
the IP is for the for the host, but in an instance where the
postmaster has been configured to listen to a specific address it
seems like the call to start the replication should be passed that
address so connections come from the slave postmaster’s IP, instead of
the host.

Is there a config option that can be used to adjust this?  I've looked
in the docs, but haven't found one yet.

Is this perhaps a bug, or lack of feature?

Thanks
-Adam

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2012-07-19 21:02:08
Subject: Re: [PERFORM] DELETE vs TRUNCATE explanation
Previous:From: Christopher BrowneDate: 2012-07-19 20:48:54
Subject: Re: 2GB limit for temp_file_limit on 32bit platform

pgsql-cluster-hackers by date

Next:From: Adam CrewsDate: 2012-07-21 05:24:11
Subject: postgres 9 bind address for replication
Previous:From: Willy-Bas LoosDate: 2012-06-27 13:23:58
Subject: Re: [PERFORM] [performance] fast reads on a busy server

pgsql-general by date

Next:From: NickDate: 2012-07-19 21:11:07
Subject: Re: High CPU on read-only streaming replication server
Previous:From: NickDate: 2012-07-19 20:44:49
Subject: Re: High CPU on read-only streaming replication server

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group