Christopher Browne cbbrowne at afilias.info
Fri Oct 18 09:25:41 PDT 2019
On Wed, Oct 16, 2019 at 1:39 PM Tory M Blue <tmblue at gmail.com> wrote:

> I'm doing another migration , but this time I'm keeping the same host
> names, so that I'm not forcing configuration changes in our various
> applications.
>
> This means that
>
> nodes 1-4 are currently subscribed and have their hostnames in the config.
> We use scripts that call a file to get the host, it's db and password
>
> When I go to add nodes
>
> 11-14,  I'm using the syntax, where xxx is the IP (not the hostname)
>
> Node, hostname
> 11, xxx.xxx.xxx.xxx
> 12, xxx,xxx,xxx,xxx
> etc
>
> the sl.path  looks like this:
>
> dbname=clsdb host=xxx.xxx.xxx.xxx user=postgres
>
>
> the sl.node contains
>
>
>  no_id | no_active | no_comment | no_failed
>
> -------+-----------+------------+-----------
>
>     11 | t         | Node  11   | f
>
>     12 | t         | Node  12   | f
>
>     13 | t         | Node  13   | f
>
>
>
>
> Wondering if there is a way to change the sl_path to be the hostname vs
> the IP (it will be the same, but does slony care?) Can I just alter the
> line in the sl_path and change IP to hostname without everything blowing up
> (given that I put the right hostname for that particular IP and of course
> it's in DNS)??
>
>
> Thinking through this more, this actually may not be an issue, as I'm
> thinking if I change hosts i'm added and dropping and can add the hostname
> at that time, but something is bothering me about leaving it as the IP
> (although in reality it's not going to change unless it's dropped). Well
> ignore the fact that this may not be warranted and focus on whether I can
> make the edits without causing mass hysteria
>

I *think* if you run the slonik command "store node" on an already-existing
cluster, it'll just update the comment in no_comment.

That's consistent with:
a) The code in storeNode_int(node_id, comment)

b) The code in storeNode(node_id, comment)

c) Uh oh.  Not so consistent with the slonik code; that wants to run
initializeLocalNode(), which will be unhappy at there being a node there
already.

But I suspect if you ran the function storeNode(id, comment), that might
well do what you're wanting, as that captures the data as an event to
propagate, and runs the storeNode_int() function locally, which would go
off and populate the node comment everywhere.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20191018/91b8df0e/attachment.htm 


More information about the Slony1-general mailing list