Discussion:
[Slony1-general] So ... must master be able to reach subscriber, or not?
Marcin Kasperski
2008-06-03 12:00:09 UTC
Permalink
(just preparing to configure my first Slony setup and reading docs,
which seem to contain different opinions)

There is machine MST on which master database runs.
There is machine CLI on which subscriber database is to run, from
which slonik scripts are to be executed just as most psql-s.

CLI is able to reach MST

MST is *not* able to reach CLI (bah, it even can't address it at the
moment)

Will Slony-I work in such config, or not?
After reading http://slony.info/documentation/plainpaths.html
I feel that it should, but a few other articles tend to require
any-to-any communication paths.

So - do master need a connection to subscriber?

And if so - for what?
(I understand that it would be needed if master had to read events
from subscriber, also if I were to swap master with backup, but
is this all?)
Christopher Browne
2008-06-03 13:12:50 UTC
Permalink
Post by Marcin Kasperski
(just preparing to configure my first Slony setup and reading docs,
which seem to contain different opinions)
There is machine MST on which master database runs.
There is machine CLI on which subscriber database is to run, from
which slonik scripts are to be executed just as most psql-s.
CLI is able to reach MST
MST is *not* able to reach CLI (bah, it even can't address it at the
moment)
Will Slony-I work in such config, or not?
After reading http://slony.info/documentation/plainpaths.html
I feel that it should, but a few other articles tend to require
any-to-any communication paths.
So - do master need a connection to subscriber?
And if so - for what?
(I understand that it would be needed if master had to read events
from subscriber, also if I were to swap master with backup, but
is this all?)
I assume here that you just have two databases, on two hosts, MST and
CLI.

It is necessary that the slon process managing node MST is able to
access both the MST and CLI hosts:

- It is managing node MST, so obviously must access it;
- It needs to be able to receive events and confirmations of events
from node CLI.

Similarly, it is necessary that the slon process managing node CLI is
able to access both the MST and CLI hosts:

- It is managing node CLI, so obviously must access it;
- It needs to be able to receive events and confirmations of events
from node MST. With MST being the origin, it is also the case that
this slon process will be drawing data from MST to replicate it to
node CLI.

If CLI is able to reach MST, then you could presumably run the slon
processes managing both nodes on CLI.
--
select 'cbbrowne' || '@' || 'linuxfinances.info';
http://www3.sympatico.ca/cbbrowne/spreadsheets.html
(THASSERT (PLANNER RG))
-- Example of HACKER statement.
Marcin Kasperski
2008-06-03 15:26:44 UTC
Permalink
Post by Christopher Browne
I assume here that you just have two databases, on two hosts, MST and
CLI.
Yes. At least for the sake of this discussion.
Post by Christopher Browne
It is necessary that the slon process managing node MST is able to
- It is managing node MST, so obviously must access it;
- It needs to be able to receive events and confirmations of events
from node CLI.
And here are my doubts. Do MST really needs to receive anything from CLI?
And what (which events and confirmations)?

Especially http://linuxfinances.info/info/plainpaths.html claims that
"You forcibly need to have a path between each subscriber node and its
provider; other paths are optional, and will not be used unless a
listen path in sl_listen. is needed that uses that particular path."

But, at the same time a few other docs claim what you do.
Post by Christopher Browne
If CLI is able to reach MST, then you could presumably run the slon
processes managing both nodes on CLI.
I remember some strong advice against running slon across weak
connection. From http://linuxfinances.info/info/bestpractices.html:
"Each slon(1) should run on a host on the same local network as the
node that it is servicing, as it does a lot of communications with its
database" (...) "slon(1) processes should run in the same "network
context" as the node that each is responsible for managing so that the
connection to that node is a "local" one. Do not run such links across
a WAN. "
--
----------------------------------------------------------------------
| Marcin Kasperski | In any large change, 1/3 will think it is
| http://mekk.waw.pl | great, 1/3 will think it is stupid, and 1/3
| | will wait (Reed)
----------------------------------------------------------------------
Hannu Krosing
2008-06-03 16:39:36 UTC
Permalink
Post by Marcin Kasperski
(just preparing to configure my first Slony setup and reading docs,
which seem to contain different opinions)
There is machine MST on which master database runs.
There is machine CLI on which subscriber database is to run, from
which slonik scripts are to be executed just as most psql-s.
CLI is able to reach MST
MST is *not* able to reach CLI (bah, it even can't address it at the
moment)
you have to have a connection both ways

one way to do it is setting up a ssh tunnel from CLI:

ssh R:5555:127.0.0.1:5432 MST

and use host=127.0.0.1 post=5555 as masters address on client
Post by Marcin Kasperski
Will Slony-I work in such config, or not?
After reading http://slony.info/documentation/plainpaths.html
I feel that it should, but a few other articles tend to require
any-to-any communication paths.
So - do master need a connection to subscriber?
And if so - for what?
(I understand that it would be needed if master had to read events
from subscriber, also if I were to swap master with backup, but
is this all?)
_______________________________________________
Slony1-general mailing list
http://lists.slony.info/mailman/listinfo/slony1-general
Continue reading on narkive:
Loading...