Home > Archive > Slony1 PostgreSQL Replication > September 2005 > Forcing an existing node to copy data fresh









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Forcing an existing node to copy data fresh
Jim Archer

2005-09-07, 8:25 pm

Hi All...

I tried posting this question before, but it keeps getting trapped. I
think it's because of my use of the word S*U*B*S*C*R*I*B*E in the message
or in the subject, so here is a new try.

While testing last night, I managed to get a node de-synced due to the wa=
y
I started a slon daemon. I figured that would be a good opportunity to
learn how to make a node start itself from scratch.

>From the docs, it seemed that the S*U*B*S*C*R*I*B*E SET command would do

this if I issued it for a nore that was already inthe cluster. I issued
the command, but nothing happened.

So, I am wondering (1) is this command should cause a working node to
recopy all the data from the provider node and, if not, (2) is there a wa=
y
to make a node do that?

Thanks very much...
Christopher Browne

2005-09-07, 8:25 pm

"Jim Archer" <jim- p8U4U2pV1R2sTnJN9+BG
Xg@public.gmane.org> writes:
> Hi All...
>
> I tried posting this question before, but it keeps getting trapped. I
> think it's because of my use of the word S*U*B*S*C*R*I*B*E in the message
> or in the subject, so here is a new try.
>
> While testing last night, I managed to get a node de-synced due to the way
> I started a slon daemon. I figured that would be a good opportunity to
> learn how to make a node start itself from scratch.
>
> this if I issued it for a nore that was already inthe cluster. I issued
> the command, but nothing happened.
>
> So, I am wondering (1) is this command should cause a working node to
> recopy all the data from the provider node and, if not, (2) is there a way
> to make a node do that?


No, the "expected result" of submitting "that command" to a node
already participating in a subscription is for the subscription
provider to be revised.

Thus, you might start with...

A ---> B ----> C

And revise it to...

A ---> B
\
\
\> C

If you request a 'path' that is already in effect, it'll turn out as a
NOOP.

What you could do to accomplish what I think you want to do is to
submit "*UN*S*U*B****** SET."
--
(reverse (concatenate 'string "ofni.sailifa.ac" "@" "enworbbc"))
<http://dev6.int.libertyrms.com/>
Christopher Browne
(416) 673-4124 (land)
Jim Archer

2005-09-08, 3:24 am

Christopher Browne said:

> No, the "expected result" of submitting "that command" to a node
> already participating in a subscription is for the subscription
> provider to be revised.
>
> Thus, you might start with...
>
> A ---> B ----> C
>
> And revise it to...
>
> A ---> B
> \
> \
> \> C
>
> If you request a 'path' that is already in effect, it'll turn out as a
> NOOP.
>
> What you could do to accomplish what I think you want to do is to
> submit "*UN*S*U*B****** SET."


I just gave this a try. I rebuilt my cluster from scratch and had a 2
machine cluster. I issued:

unsub*scr*ibe set (id =3D @SET_FULL, receiver =3D @NODE_02);

This seemed to work as documented. The database on the slave was
unlocked, so I could modify it, and the slony-added schema remained in
place.

I then issued:

sub*scr*ibe set (id =3D @SET_FULL, provider =3D @ORIGIN, receiver =3D @NO=
DE_02,
forward =3D no );

That didn't seem to do anything. The database remained unlocked and I
didn't see any copy activity in the slon log that services that node.

I then decided to add a third node to the cluster. I issued:

store node (id=3D@NODE_04, comment =3D 'Node 04 Hartford', spoolnode=3Dfa=
lse,
event node =3D @ORIGIN);

This created the schema on that node correctly. I then started a slon to
service this new node and issued:

subscribe set ( id =3D @SET_FULL, provider =3D @ORIGIN, receiver =3D @NOD=
E_04,
forward =3D no);

Again, nothing. No copy activity.

Oh, I created the store paths when I created the cluster originally.

Did I miss something or is there a problem with subscribing sets on an
existing cluster?
Jim Archer

2005-09-08, 3:24 am

Christopher Browne said:

> No, the "expected result" of submitting "that command" to a node
> already participating in a subscription is for the subscription
> provider to be revised.
>
> Thus, you might start with...
>
> A ---> B ----> C
>
> And revise it to...
>
> A ---> B
> \
> \
> \> C
>
> If you request a 'path' that is already in effect, it'll turn out as a
> NOOP.
>
> What you could do to accomplish what I think you want to do is to
> submit "*UN*S*U*B****** SET."


I just gave this a try. I rebuilt my cluster from scratch and had a 2
machine cluster. I issued:

unsub*scr*ibe set (id =3D @SET_FULL, receiver =3D @NODE_02);

This seemed to work as documented. The database on the slave was
unlocked, so I could modify it, and the slony-added schema remained in
place.

I then issued:

sub*scr*ibe set (id =3D @SET_FULL, provider =3D @ORIGIN, receiver =3D @NO=
DE_02,
forward =3D no );

That didn't seem to do anything. The database remained unlocked and I
didn't see any copy activity in the slon log that services that node.

I then decided to add a third node to the cluster. I issued:

store node (id=3D@NODE_04, comment =3D 'Node 04 Hartford', spoolnode=3Dfa=
lse,
event node =3D @ORIGIN);

This created the schema on that node correctly. I then started a slon to
service this new node and issued:

sub*sc*ribe set ( id =3D @SET_FULL, provider =3D @ORIGIN, receiver =3D @N=
ODE_04,
forward =3D no);

Again, nothing. No copy activity.

Oh, I created the store paths when I created the cluster originally.

Did I miss something or is there a problem with sub*scr*ibing sets on an
existing cluster?
Tim Goodaire

2005-09-08, 8:24 pm

____________________
____________________
_______
Slony1-general mailing list
Slony1-general- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org
http://gborg.postgresql.org/mailman.../slony1-general

Jim Archer

2005-09-08, 8:24 pm

Tim Goodaire said:

> Often, if you're sending events through and they're not showing up on
> all of the nodes, it's one of the following:
>
> 1. A slon isn't running
> 2. Your paths are wrong
> 3. Your listen network is wrong
> 4. You haven't waited long enough for the event to propogate through to
> all of the nodes


Hm, on Slony 1.1, do I have to manually specify the listen network? I
thought that was handled automagically from the path statements. If not,
that could be my problem...

Thanks...
Brad Nicholson

2005-09-08, 8:24 pm

Jim Archer wrote:

>Tim Goodaire said:
>
>
>
>
>Hm, on Slony 1.1, do I have to manually specify the listen network? I
>thought that was handled automagically from the path statements. If not,
>that could be my problem...
>
>
>

It is handled automatically in 1.1. It's still worth having a look to
see if it's setup properly, though.

--
Brad Nicholson 416-673-4106
Database Administrator, Afilias Canada Corp.
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com