From 5461520dedd124076f6e9372149de0fc8dcacda4 Mon Sep 17 00:00:00 2001 From: jian he Date: Tue, 24 Feb 2026 15:19:41 +0800 Subject: [PATCH v19 1/1] misc change for v19 --- doc/src/sgml/ref/pg_restore.sgml | 10 ++++++++++ src/bin/pg_dump/pg_dumpall.c | 6 ++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgml index ff50fc23539..47ad26630eb 100644 --- a/doc/src/sgml/ref/pg_restore.sgml +++ b/doc/src/sgml/ref/pg_restore.sgml @@ -69,6 +69,16 @@ PostgreSQL documentation pg_dump options. + + Restoring from an archive created by pg_dumpall does not support the following options: + , + , + , + , + , + . + + A non-plain-text archive made using pg_dumpall is a directory containing a toc.glo file with global diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index 92d1214b421..bdbe52cfe3c 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -135,7 +135,6 @@ static SimpleStringList database_exclude_names = {NULL, NULL}; static char *restrict_key; static Archive *fout = NULL; -static pg_compress_specification compression_spec = {0}; static int dumpIdVal = 0; static ArchiveFormat archDumpFormat = archNull; static const CatalogId nilCatalogId = {0, 0}; @@ -656,6 +655,7 @@ main(int argc, char *argv[]) PQExpBuffer qry = createPQExpBuffer(); char global_path[MAXPGPATH]; const char *encname; + pg_compress_specification compression_spec = {0}; /* * Check that no global object names contain newlines or carriage @@ -1194,7 +1194,9 @@ dumpRoles(PGconn *conn) if (archDumpFormat == archNull) { fprintf(OPF, "%s", buf->data); - fprintf(OPF, "%s", comment_buf->data); + + if (comment_buf->data[0] != '\0') + fprintf(OPF, "%s", comment_buf->data); if (seclabel_buf->data[0] != '\0') fprintf(OPF, "%s", seclabel_buf->data); -- 2.34.1