Bug 257 - Proposal for client_encoding option to slon
Summary: Proposal for client_encoding option to slon
Status: NEW
Alias: None
Product: Slony-I
Classification: Unclassified
Component: slon (show other bugs)
Version: devel
Hardware: All All
: low enhancement
Assignee: Slony Bugs List
URL:
Depends on:
Blocks:
 
Reported: 2011-12-21 07:11 UTC by William Tisäter
Modified: 2011-12-23 11:31 UTC (History)
1 user (show)

See Also:


Attachments
slon client_encoding (5.90 KB, patch)
2011-12-21 07:13 UTC, William Tisäter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description William Tisäter 2011-12-21 07:11:16 UTC
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.
Comment 1 William Tisäter 2011-12-21 07:13:34 UTC
Created attachment 139 [details]
slon client_encoding
Comment 2 Jan Wieck 2011-12-23 07:51:35 UTC
Can't the exact same be achieved by doing

    ALTER USER <slon-user> SET client_encoding TO UTF8;

on the LATIN1 encoded database(s)?
Comment 3 William Tisäter 2011-12-23 09:00:03 UTC
Yes you can, as long as you don't use the same user for other stuff :)
Comment 4 Jan Wieck 2011-12-23 11:31:15 UTC
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.