On 03/20/2016 06:40 PM, Yuri Niyazov wrote: > [4:35pm] yuri_niyazov: "Again, use compatible initdb flags that match > the old cluster" - this is when running initdb before running pg_upgrade > [4:36pm] RhodiumToad: same encoding, locale, and checksum settings > [4:36pm] yuri_niyazov: Can I recover those from the data directory? The > previous initdb was ran 3 admins ago > [4:37pm] RhodiumToad: psql -l against the old server and look at the > encoding and locale for template0 > [4:37pm] RhodiumToad: checksums are almost certainly not enabled, but > you can check that by running pg_controldata against the old data dir > [4:38pm] yuri_niyazov: thank you! > [4:38pm] RhodiumToad: (if the old server is too old for checksums, then > don't enable them in the new initdb) > > I took RhodiumToad's comments and made them into a patch to pg_upgrade's > documentation.
I think it's worth clarifying the documentation along the lines you suggest, but I'm not sure about the details. A better way to get the *cluster* locale is from pg_controldata. I don't know to what extent pg_upgrade actually requires the encoding to match, since that is mostly determined by the locale, and in the cases it's not, it might not matter. Interesting to me would be a way, perhaps with an option in initdb, to just say, initialize this cluster compatibly with that other cluster, so you don't have to worry about these details. -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers