קושי בשדרוג PostgreSQL מ-9.3 לגרסה הנוכחית

There were a couple older sites on Digital Ocean that failed to upgrade to Postgres 9.5 and I stuck with the old template for 9.3. As I recall it had to do with default db encodings being incorrect on the older images.