Wed Sep 12 13:30:52 PDT 2007
- Previous message: [Slony1-general] init cluster won't work when node id out of range.
- Next message: [Slony1-general] cluster broken
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 9/12/2007 3:40 PM, JP Fletcher wrote:
> I just noticed when doing a different cluster, that the same thing seems
> to happen with STORE NODE
It is a side effect of that TABLE ADD KEY misfeature. It requires a
cluster wide uniquely maintained sequence, and the way slony does that
is by setting that sequence to the nodeID * 1000000000000000.
I didn't plan for someone using birth dates or lottery ticket numbers as
nodeID's ;-) Sorry, for the time being you have to stay below something
around 9220 ... the problem will be gone in 2.0.
Jan
>
> /opt/scripts/slonik/cluster/cluster_init.slonik:5: PGRES_FATAL_ERROR
> select "_cluster".initializeLocalNode(650901, 'Node 650901'); select
> "_cluster".enableNode_int(650901); - ERROR: bigint out of range
> CONTEXT: SQL statement "SELECT setval('"_cluster".sl_rowid_seq', $1
> ::int8 * '1000000000000000'::int8)"
> PL/pgSQL function "initializelocalnode" line 26 at perform
>
> The slonik command was
>
> STORE NODE (ID = 650901, EVENT NODE = 22, COMMENT = 'Node 650901');
>
> These node ids may have been created initially on 1.0.5, many months ago...
>
> JP Fletcher wrote:
>> Hi,
>>
>> I'm trying to create a test cluster in the image of one that already
>> exists. The script I'm using connects to the existing cluster, then
>> builds an INIT CLUSTER command based on the current origin node. The
>> id of the node in question is 40003. The INIT CLUSTER fails with the
>> following:
>>
>> /opt/scripts/slonik/cluster/cluster_init.slonik:2: PGRES_FATAL_ERROR
>> select "_cluster".initializeLocalNode(40003, 'Node 40003'); select
>> "_cluster".enableNode(40003); - ERROR: bigint out of range
>> CONTEXT: SQL statement "SELECT setval('"_cluster".sl_rowid_seq', $1
>> ::int8 * '1000000000000000'::int8)"
>> PL/pgSQL function "initializelocalnode" line 26 at perform
>>
>>
>> The node in question was added via STORE NODE, and a MOVE SET was done
>> at some time. If a node id is acceptable to STORE NODE should it not
>> also be acceptable to INIT CLUSTER? I happened to notice this on a
>> 1.1.5 cluster, but it looks to me that initializeLocalNode() is
>> identical in v 1.2.
>>
>> JP
>>
>
>
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck at Yahoo.com #
- Previous message: [Slony1-general] init cluster won't work when node id out of range.
- Next message: [Slony1-general] cluster broken
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list