• Bruce Momjian's avatar
    Avoid using NAMEDATALEN in pg_upgrade · dc9896a2
    Bruce Momjian authored
    Because the client encoding might not match the server encoding,
    pg_upgrade can't allocate NAMEDATALEN bytes for storage of database,
    relation, and namespace identifiers.  Instead pg_strdup() the memory and
    free it.
    
    Also add C comment in initdb.c about safe NAMEDATALEN usage.
    dc9896a2
pg_upgrade.h 12.7 KB