Mon Apr 26 11:16:31 PDT 2010
- Previous message: [Slony1-general] [slony-general] changing the PK of a replicated table
- Next message: [Slony1-general] [slony-general] changing the PK of a replicated table
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>i suspect that what is happening is that they're getting an error
>because
they try to insert a null in the PK (they have a lot of those,
>while
the pk is a sequence of numbers they didn't use serial when
>created
it) what they want to do now, i guess, is to create a new pk
>that is a
serial and allow the old pk column to accept nulls so if
>they send a
value or a null it's meaningless (actually that is what i
>see in the
script they want to execute)...
Well, if the "name" of the primary key will not change, then EXECUTE
SCRIPT would work. However, based on the latest information you
provided. You might want to consider:
A. SET
DROP
TABLE on the table with the pkey change.
B. Do a manual DDL to change the pkey on all nodes. (Hopefully not too
many)
C. Create a new set with the table and then a MERGE SET to add the table
back into replication.
Of course, another factor would be the size of the table and how long it
would take to re-subscribe.
Melvin Davidson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20100426/1d7fdf91/attachment.htm
- Previous message: [Slony1-general] [slony-general] changing the PK of a replicated table
- Next message: [Slony1-general] [slony-general] changing the PK of a replicated table
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list