pgsql: Avoid using NAMEDATALEN in pg_upgrade

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема pgsql: Avoid using NAMEDATALEN in pg_upgrade
Дата
Msg-id E1TllIH-0006Fr-Uy@gemulon.postgresql.org
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Follow TLI of last replayed record, not recovery target TLI, in
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Fix recycling of WAL segments after changing recovery target tim