Re: Non-text mode for pg_dumpall

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Mahendra Singh Thalor <mahi6run(at)gmail(dot)com>
Cc: Srinath Reddy <srinath2133(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Non-text mode for pg_dumpall
Date: 2025-02-03 12:49:15
Message-ID: CACJufxE8wv4aeXenhjEXTW6yTbh-_c-yKi90wrM4ipBqKNpm3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 3, 2025 at 5:14 PM jian he <jian(dot)universality(at)gmail(dot)com> wrote:
>
> there is some corner like num_db_restore == 0, num_db_restore >= 100
> in that scarenio, the execute_global_sql_commands already executed,
> which is not ideal, since you have pg_fatal and some sql commands
> already executed.
> maybe we can be if 0 < num_db_restore < 100 then
> call execute_global_sql_commands and restoreAllDatabases.
>
>
> the attached patch trying to do that.
> attached patch also doing some cosmetic changes.

hi.
please ignore the previous patch. see this email attached patch.
previously I complained that the ``pg_restore --list`` needed a db
connection and also called execute_global_sql_commands in [1]
this email attached patch fixes the problem, now pg_restore --list no
need db connection.

now the logic is:
if num_db_restore value is ok (0 < num_db_restore < MAX_ON_EXIT_NICELY)
*AND* we didn't specify --list option
then call execute_global_sql_commands.

[1] https://postgr.es/m/CACJufxHUDGWe=2ZukvMfuwEcSK8CsVYm=9+rtPnrW7CRCfoCsw@mail.gmail.com

Attachment Content-Type Size
v14-0001-fix-pg_restore-list-option-and-handle-invoke-.no-cfbot application/octet-stream 5.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Koterov 2025-02-03 12:49:32 Re: Increased work_mem for "logical replication tablesync worker" only?
Previous Message Rahila Syed 2025-02-03 12:47:14 Re: Enhancing Memory Context Statistics Reporting