pgsql: Avoid using NAMEDATALEN in pg_upgrade - Mailing list pgsql-committers

From Bruce Momjian
Subject pgsql: Avoid using NAMEDATALEN in pg_upgrade
Date
Msg-id E1TllIH-0006Fr-Uy@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Avoid using NAMEDATALEN in pg_upgrade

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/dc9896a2457f0d72458f1ff45935362521f0f99c

Modified Files
--------------
contrib/pg_upgrade/info.c       |   31 ++++++++++++++++++++-----------
contrib/pg_upgrade/pg_upgrade.h |   11 ++++++-----
src/bin/initdb/initdb.c         |    2 +-
3 files changed, 27 insertions(+), 17 deletions(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Follow TLI of last replayed record, not recovery target TLI, in
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix recycling of WAL segments after changing recovery target tim