Pushed. I included the test case for collations to the three branches, but no code changes. We can patch master for the handling of collations per your patch, and if somebody has it, a change to how defaults are applied when routing tuples.
Thanks to Jürgen for reporting the bug. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services