On Mon, 2006-10-02 at 12:29 -0400, Andrew Sullivan wrote:
> On Fri, Sep 29, 2006 at 11:41:38AM -0700, Jeff Davis wrote:
> > If I lock the set, then move the set, then I think it's already
>
> I don't think you need to issue an explicit lock before the move.
>
(in the command below, cluster_info.slonik only contains cluster name,
and node 1 & 2 admin conninfo)
% slonik
include <cluster_info.slonik>;
move set (id = 1, old origin = 1, new origin = 2);
<stdin>:2: PGRES_FATAL_ERROR select "_cluster01".moveSet(1, 2); -
ERROR: Slony-I: set 1 is not locked
But, if I do:
% slonik
include <cluster_info.slonik>;
lock set (id = 1, origin = 1);
move set (id = 1, old origin = 1, new origin = 2);
it works.
However, afterward, if I try to unlock, I get:
% slonik
include <cluster_info.slonik>;
unlock set (id = 1, origin = 1);
<stdin>:2: PGRES_FATAL_ERROR select "_cluster01".unlockSet(1); - ERROR:
Slony-I: set 1 does not originate on local node
or
% slonik
include <cluster_info.slonik>;
unlock set (id = 1, origin = 2);
<stdin>:2: PGRES_FATAL_ERROR select "_cluster01".unlockSet(1); - ERROR:
Slony-I: set 1 is not locked
which indicates to me that the "move set" also unlocked the set. So
what's the use of unlock set?
> > Under what circumstances should I use move set?
>
> When you're hoping to move the origin.
>
Oops, what I meant to say was, when should I use unlock set?
Thanks,
Jeff Davis
_______________________________________________
Slony1-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/slony1-general