From: | jian he <jian(dot)universality(at)gmail(dot)com> |
---|---|
To: | Mahendra Singh Thalor <mahi6run(at)gmail(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
Subject: | Re: Non-text mode for pg_dumpall |
Date: | 2025-01-21 04:05:58 |
Message-ID: | CACJufxFJ9yJ=+WAHpXbDxf077Xw3O+ZziTwS55+ZK5APJ+6mUg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
hi.
$BIN10/pg_restore --globals-only --verbose --file=test.sql x.dump
it will create a "test.sql" file, but it should create file test.sql
(no double quotes).
------<>>>>------
if (archDumpFormat != archNull &&
(!filename || strcmp(filename, "") == 0))
{
pg_log_error("options -F/--format=d|c|t requires option
-f/--filename with non-empty string");
...
}
here, it should be
pg_log_error("options -F/--format=d|c|t requires option -f/--file with
non-empty string");
------<>>>>------
the following pg_dumpall, pg_restore not working.
$BIN10/pg_dumpall --format=custom --file=x1.dump --globals-only
$BIN10/pg_restore --file=3.sql x1.dump
ERROR: pg_restore: error: directory "x1.dump" does not appear to be a
valid archive ("toc.dat" does not exist)
these two also not working:
$BIN10/pg_dumpall --format=custom --file=x1.dump --verbose --globals-only
$BIN10/pg_restore --file=3.sql --format=custom x1.dump
error message:
pg_restore: error: could not read from input file: Is a directory
------<>>>>------
IsFileExistsInDirectory function is the same as _fileExistsInDirectory.
Can we make _fileExistsInDirectory extern function?
+ /* If global.dat and map.dat are exist, then proces them. */
+ if (IsFileExistsInDirectory(pg_strdup(inputFileSpec), "global.dat")
+ && IsFileExistsInDirectory(pg_strdup(inputFileSpec),
"map.dat"))
+ {
comment typo, "proces" should "process".
here, we don't need pg_strdup?
------<>>>>------
# pg_restore tests
+command_fails_like(
+ [
+ 'pg_restore', '-p', $port, '-f', $plainfile,
+ "--exclude-database=grabadge",
+ '--globals-only'
+ ],
+ qr/\Qg_restore: error: option --exclude-database cannot be used
together with -g\/--globals-only\E/,
+ 'pg_restore: option --exclude-database cannot be used together
with -g/--globals-only');
We can put the above test on src/bin/pg_dump/t/001_basic.pl,
since validating these conflict options don't need a cluster to be set up.
typedef struct SimpleDatabaseOidListCell
and
typedef struct SimpleDatabaseOidList
need also put into src/tools/pgindent/typedefs.list
From | Date | Subject | |
---|---|---|---|
Next Message | Sumanth Vishwaraj | 2025-01-21 04:46:04 | Re: [External] : Re: New feature request for adding session information to PostgreSQL transaction log |
Previous Message | Corey Huinker | 2025-01-21 03:59:44 | Re: Statistics Import and Export |