Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 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.

share|improve this answer
    
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 Feb 22 '12 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 Feb 22 '12 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. –  Hz.Root May 28 '12 at 8:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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