Vick Khera vivek at khera.org
Mon May 10 08:14:39 PDT 2010
On Mon, May 10, 2010 at 1:29 AM, sowjanya v <sowjuec at gmail.com> wrote:
> Hi,
>
> I have two databases db1 and db2. db2 is replica of db1. Now i have added a
> column in a table in db1. Since schema changes do not propogate by itself to
> db2, need to execute execute script. But the input for that is a sql file
> with all  difference in schema. Hence please let me know how replicate the
> schema changes. If i do the diff of two schemas, it only shows the lines
> where the difference is present and not the sql command to be executed on
> db2 to make it same as db1. Please do reply immediately.

What you need to do is take the commands that you actually ran by hand
(they should be in your .pgsql_history file) and put those into a
file, then run that script.  You should *never* update your production
schemas in any other way than having the commands in a file.  Further
you should never update your schemas without running them thru EXECUTE
SCRIPTslonik command.

You will want to un-do whatever changes you made to your master and
run those thru the EXECUTE SCRIPT slonik command as well.  Otherwise
your replication will likely be broken.  Without knowing what changes
you made, it is even possibile your data is not properly synchronized
already.


More information about the Slony1-general mailing list