I'm running a Slony-I cluster with four databases using LATIN1 encoding. Now we are in a stage where we are going to switch to UTF8 and I found Slony-I was perfect for this task. I have in the attached patch adding a new option to slon and a new configuration parameter (-e and client_encoding). If you are switching to UTF8, just fire up the subscriber with "./slon -e utf8 replication dbname" and the postmaster will handle the conversion for you. Hate or love.
Created attachment 139 [details] slon client_encoding
Can't the exact same be achieved by doing ALTER USER <slon-user> SET client_encoding TO UTF8; on the LATIN1 encoded database(s)?
Yes you can, as long as you don't use the same user for other stuff :)
I am not against this feature. But I am worried that there may be more similar things that fall into the same user settings category, which could in the end lead to a number or actually redundant configuration options. What prevents you from creating a dedicated Slony user? I would like to hear other Slony users/developers weigh in on this. If we decide to add this, the patch itself looks technically good to me, but it is lacking updates to the documentation.