pgsql: pg_dump: Fix ArchiveEntry handling of some empty values

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема pgsql: pg_dump: Fix ArchiveEntry handling of some empty values
Дата
Msg-id E1gzSDD-0001OA-Jy@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
pg_dump: Fix ArchiveEntry handling of some empty values

Commit f831d4acc changed what pg_dump emits for some empty fields: they
were output as empty strings before, NULL pointer afterwards.  That
makes old pg_restore unable to work (crash) with such files, which is
unacceptable.  Return to the original representation by explicitly
setting those struct members to "" where needed; remove some no longer
needed checks for NULL input.

We can declutter the code a little by returning to NULLs when we next
update the archive version, so add a note to remind us later.

Discussion: https://postgr.es/m/20190225074539.az6j3u464cvsoxh6@depesz.com
Reported-by: hubert depesz lubaczewski
Author: Dmitry Dolgov

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/19455c9f5606072a191962271c35ad659fbab526

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c | 11 ++++---
src/bin/pg_dump/pg_backup_archiver.h |  7 ++++-
src/bin/pg_dump/pg_dump.c            | 56 ++++++++++++++++++++++++++++++------
3 files changed, 58 insertions(+), 16 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Merge near-duplicate code in RI triggers
Следующее
От: Andres Freund
Дата:
Сообщение: pgsql: Allow buffer tuple table slots to materialize afterExecStoreVir