Re: Non-text mode for pg_dumpall
tushar <tushar.ahuja@enterprisedb.com>
From: tushar <tushar.ahuja@enterprisedb.com>
To: Mahendra Singh Thalor <mahi6run@gmail.com>
Cc: Vaibhav Dalvi <vaibhav.dalvi@enterprisedb.com>,
pgsql-hackers@lists.postgresql.org
Date: 2025-12-02T13:15:06Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add non-text output formats to pg_dumpall
- 763aaa06f034 19 (unreleased) landed
-
Improve pg_dump/pg_dumpall help synopses and terminology
- dec6643487bb 18.0 cited
-
Non text modes for pg_dumpall, correspondingly change pg_restore
- 1495eff7bdb0 18.0 landed
-
Doc: manually break lines in wide UUID examples.
- a6524105d20b 18.0 cited
On Mon, Dec 1, 2025 at 10:47 PM tushar <tushar.ahuja@enterprisedb.com>
wrote:
>
>>
> I have observed that when combining the --globals-only option with certain
> other switches during a pg_restore - operation fails silently.
> The attempted restore does not execute, but no error message or warning is
> displayed unless the --verbose option is also used.
>
> --this will just run without any message but objects also not going to
> create
> ./pg_restore -Fc ok31. -C -d postgres -t mytable --globals-only
> ./pg_restore -Fc ok31. -C -d postgres -no-tablespace --globals-only
> ./pg_restore -Fc ok31. -C -d postgres -no-data --globals-only
>
> with --verbose
> [edb@1a1c15437e7c bin]$ ./pg_restore -Fc ok31. -C -d postgres -t myable
> --globals-only -v
> pg_restore: connecting to database for restore
> pg_restore: executing SELECT pg_catalog.set_config('search_path', '',
> false);
> pg_restore: implied no-schema restore
> pg_restore: database restoring skipped because option -g/--globals-only
> was specified
>
> we should probably add some message there.
>
>
Please refer this scenario where "--no-comments" switch is ignoring when
used with -Ft/c option of pg_dumpall
*Test Case to reproduce:*
--Connect to psql terminal , create a table and comment :
postgres=# create table t(n int);
CREATE TABLE
postgres=# insert into t values (1);
INSERT 0 1
postgres=# comment on table t is 'testing...';
COMMENT
postgres=# SELECT obj_description('public.t'::regclass, 'pg_class') AS
table_comment ;
table_comment
---------------
testing...
(1 row)
--perform pg_dumpall with
(a) -Fp (./pg_dumpall -Fp --no-comments -f dump.plain)
(b) -Ft (./pg_dumpall -Ft --no-comments -f dump.tar)
Case 1: restore (a) , just run the file (dump.plain) on psql terminal ,
fire this query :
postgres=# SELECT
obj_description('public.t'::regclass, 'pg_class') AS table_comment;
table_comment
---------------
(1 row)
Seems expected .
Case 2: restore (b) via command ( ./pg_restore -Ft dump.tar -d postgres -p
5806 -C )
fire this query :
postgres=# SELECT obj_description('public.t'::regclass, 'pg_class') AS
table_comment ;
table_comment
---------------
testing...
(1 row)
Seems not expected i.e pg_dumpall with option -Ft still taking table
comments and ignoring --no-comments switch.
regards,