Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> A long time ago, we changed LC_COLLATE and LC_CTYPE from cluster-wide to
> per-database (61d967498802ab86d8897cb3c61740d7e9d712f6). There is some
> leftover code from that in initdb.c and backend/main/main.c to pass
> these environment variables around in the expectations that the backend
> will write them to pg_control during bootstrap, which is of course all a
> lie now.
Well, the comments' references to pg_control are indeed obsolete, but why
wouldn't we just replace that with references to "the appropriate entry in
pg_database"? I don't see why that movement changed anything about what
should happen here. In particular, I'm concerned that this patch will
result in subtle changes in what settings get chosen during initdb.
regards, tom lane