On Mon, Feb 3, 2025 at 5:14 PM jian he <jian.universal...@gmail.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+rtpnrw7crcfo...@mail.gmail.com
v14-0001-fix-pg_restore-list-option-and-handle-invoke-.no-cfbot
Description: Binary data