14: PGRES_FATAL_ERROR lock table "_disorder_replica".sl_config_lock;select "_disorder_replica".setAddTable(4, 9, 'disorder.do_config', 'do_config_pkey', 'disorder.do_config'); - ERROR: trigger "_disorder_replica_truncatetrigger" for relation "do_config" already exists The above error happens if you try to add a table to replication that was previously part of a replication set that was dropped. alterTableDropTriggers does not remove the truncate trigger from the table. This bug is new in 2.1.0 and is present in 2.1.0 rc1
Please review patch.
I have revised the "legacy" regression tests to check this, with success: https://github.com/cbbrowne/slony1-engine/commit/b06c96faaa06bd42d18f355759851700b07ec2f4 Here is a preliminary "clustertest" regression test; the parts that actually run TRUNCATE need to be filled in. https://github.com/cbbrowne/slony1-engine/commit/eb85c6dfa63832838d79db801f3f3749c597192b Here is a revision to release notes for this change: https://github.com/cbbrowne/slony1-engine/commit/b06c96faaa06bd42d18f355759851700b07ec2f4 I suggest taking my first and third patch as part of the release candidate. I'll pursue getting the "clustertest" test set up with Steven; that shouldn't hold up release.
I have a question about this part of the patch (Jan's original patch). - perform @NAMESPACE@.add_truncate_triggers(); - + -- 2.0 was the only 2.x version without truncate support + if p_old like '2.0.%' then + perform @NAMESPACE@.upgradeSchemaAddTruncateTriggers(); + end if; With the 2.1 version prior to this patch if I upgrade an 8.3 server to a 8.4 server and run the slonik 'update functions' command everything works and truncate triggers get added. With this patch that won't happen anymore correct?
A couple more commits to draw in... 1. Spelling fix https://github.com/cbbrowne/slony1-engine/commit/45f7547f0f9a1be57dd0127ff439205aa6ce07be 2. Filling in the regression tests for truncation https://github.com/cbbrowne/slony1-engine/commit/c68dcbdd5e9cbf4f482e27bf7e32849fdf16e6ed
I removed the 2.0 check as per Steve's comment and merged in Chris' commits. https://github.com/wieck/slony1-engine/commit/661c6e82167515a203bc8574c7e3f17d1c9f5cce
This was merged into 2.1.0 6838c614d10368500abce2c12490935bdea0da3d