Setting Slony on a large production database

From: Nicolas(dot)PAYART(at)gmail(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: Setting Slony on a large production database
Date: 2006-08-10 13:45:29
Message-ID: 1155217529.829663.68060@h48g2000cwc.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have to set up a replication database from a large production
database on a new server, using Slony.

As the tables I have to replicate have several million rows, I tried to
dump the entire database from the master and restore it as a slave
database before setting up Slony (in a developpement environnement to
test it first). Unfortunately, even if my two databases are equal, it
seems that Slony still execute a "copy" on the replicated tables.

In pg_stat_activity of the master database, I can see something like :

datid | datname | procpid | usesysid | usename |
current_query
--------+----------------+---------+----------+----------+------------------+
366347 | db_master | 11659 | 10 | postgres | copy
"public"."mytable" ("id","field2","field3") to stdout;

Is it a good idea to dump the master database and restore it as a slave
database before setting up Slony ? Should it prevent Slony from
replicating the whole data the first time ? And, If so, then why is
Slony doing a "copy" in my case ?

Thanks for your help,
Regards,

Nico

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Carl R. Brune 2006-08-10 14:15:38 Re: read only transaction, temporary tables
Previous Message Merlin Moncure 2006-08-10 13:28:19 Re: Accessing Database Data from C Function