Thread: Different host aliases in SLONY configuration table

Different host aliases in SLONY configuration table

From
Timur Luchkin
Date:

Hello,


I have a question regarding SLONY replication. In short, the question is: Can I have different values on every node in the "sl_path" table in column "pa_conninfo"? 

For example, one node has IP addresses in "pa_conninfo", but other has aliases from /etc/hosts?


More detailed description:

I have 3 nodes: node1 (master), node2 (slave) and node3 (cascaded slave of node2). All nodes communicate between each other by aliases from /etc/hosts (lets say "masterdb", "slavedb" and "node3db"). 

node3 is additionally an application server. All applications from node3 point to primary database (node1) by the same aliases, as SLONY from database on node3. 

Today I did a switchover from node1 to node2, and I have changed aliases on node3 for applications (I have assigned IP address of node2 to "masterdb"alias). 

But I forgot about the fact that database on node3 uses the same aliases. And now DB on node3 stuck in some unknown state, because both "masterdb" and "slavedb" aliases point to the same host (database). 


So, I decided to drop and recreate replication on node3. But I can't use aliases "masterdb" and "slavedb" on node3 anymore (I can't change host aliases for applications, because of some internal reasons).   


Finally, returning to my question:

Can I have host aliases in sl_path table on node1 and node2, but node3 will have IP addresses instead (or can I use different alias names on each node)?  



Software: 

OS: Linux

DB: PostgreSQL 8.1.10 (node1) and 8.2.6 (node2, node3)

SLONY: slony1-1.2.12




--

Best regards,

Timur Luchkin

C.T.Xm Database Administrator

mailto:Timur.Luchkin@ctxm.com



--
This message has been scanned for viruses and
dangerous content and is believed to be clean.

Re: Different host aliases in SLONY configuration table

From
"Christopher Browne"
Date:
On Thu, Feb 14, 2008 at 12:10 PM, Timur Luchkin <timur.luchkin@ctxm.com> wrote:
> I have a question regarding SLONY replication. In short, the question is:
> Can I have different values on every node in the "sl_path" table in column
> "pa_conninfo"?
>
> For example, one node has IP addresses in "pa_conninfo", but other has
> aliases from /etc/hosts?

This is more generally a matter for the Slony-I discussion list, but I
can touch on the answer here...

Yes, you may use varying kinds of values for hostnames for
"sl_path.pa_conninfo".

I'd expect that to be unwise from the perspective that it means you
need to be looking at network configuration in multiple ways, which I
would expect to lead to a risk of confusion.

If you're clear on everything, and are careful not to get confused,
there's no problem.  I know I'd be likely to get confused when mixing
name and IP addresses.

Further, if your network is configured in such a way that different
hosts see each other differently, that seems likely to have a huge
risk of confusion.  For instance, I could see this happening if two
nodes have DNS configured, and one doesn't.  I rather dislike that
network configuration!  :-)
--
http://linuxfinances.info/info/linuxdistributions.html
"The definition of insanity is doing the same thing over and over and
expecting different results." -- assortedly attributed to Albert
Einstein, Benjamin Franklin, Rita Mae Brown, and Rudyard Kipling