<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="font-family: arial; font-size: 13px; border-collapse: collapse; ">So we follow the best practice of testing DDL by wrapping it in a&nbsp;BEGIN...ROLLBACK and making sure it "works" on the master before&nbsp;pushing it out using slonik_execute_script.<br><br>Yesterday we got burned. &nbsp;We had some DDL that included a DROP&nbsp;FUNCTION. &nbsp;Problem was the function existed on the master but not on<br>the slaves. &nbsp;(We should have used DROP FUNCTION IF EXISTS, but we&nbsp;didn't.)<br><br>So we got into the thing where the slon daemon on the slaves would die&nbsp;and then get respawned and then try to sync a ton of stuff and die&nbsp;whenever it hit the PGRES_FATAL_ERROR with the messed up DDL. &nbsp;Finally&nbsp;we created the missing function on the slaves and then the DDL could&nbsp;complete and after a few minutes, everything was back to normal.<br><br>I propose that a better best practice is to test the DDL on the master *and every slave* in a BEGIN...ROLLBACK to make sure the DDL will&nbsp;succeed everywhere. &nbsp;We've built a program to do this, try_slony_ddl,&nbsp;but it's written in Tcl. &nbsp;Perhaps someone with better Perl skills than&nbsp;I could make a slonik_test_script that does the same thing but uses&nbsp;the slon_tools.conf. &nbsp;(My stuff currently gets the db connect strings&nbsp;out of sl_path).<br><br>I share this in the hope that it might be useful to someone. &nbsp;We feel&nbsp;like after something's been shown by try_slony_ddl to work on the master and all the slaves, it's a pretty&nbsp;dead certainty that it's going to work when pushed out with&nbsp;slonik_execute_script.<br><br>Karl</span></body></html>