1

I’m working on a project where we are using pg_dump to get the data out of one database and then using psql to load it into another. The second database is the master db in a Slony replication cluster.

No matter what options I specify in pg_dump the changes are not being replicated. I’ve use a standard dump which uses COPY, a --inserts dump which uses INSERT INTO and a --insert-columns dump which adds column names to the INSERT INTO statements.

If I edit the data in pgAdmin III using the view option for the table, that change is replicated just fine.

What is the difference between editing the data that way in pgAdmin III and using psql to load a dump file?

1 Answer 1

1

Make sure you are not using the --disable-triggers option of pg_dump since slony replication is based on triggers. Check the dump file for ALTER TABLE <table_name> DISABLE TRIGGER ALL statements.

3
  • Beginning of the file doesn't contain an ALTER TABLE <table_name> DISABLE TRIGGER ALL. Slony is seeing the changes, but its getting in a lock state trying to replicate them out. Could it be due to being asked to replicate out a large set that was applied using a copy command?
    – smccloud
    Commented Feb 22, 2012 at 13:49
  • I guess there might be a problem with locks during restore is running, but at least when the data import is finished replication must catch up. There should be no problem with larger datasets imported with COPY. Please post your dump and restore commands and the relevant parts of the slony log on master and slave. The imported database is neither replication master nor slave, right?
    – tscho
    Commented Feb 22, 2012 at 17:50
  • could you please paste the pg_dump command you use. You shouldn't run ddl queries in master while replicating with slony. may be those cause a problem.
    – sftsz
    Commented May 28, 2012 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.