Comments on 0001 @@ -87,6 +87,21 @@ PostgreSQL documentation command-line arguments: <variablelist> + <varlistentry> + <term><option>-a</option></term> + <term><option>--all</option></term> + <listitem> + <para> + Create one subscription per all non-template databases on the target + server. Automatically generated names for subscriptions, publications,
Already provided comment on this part. +/* + * If --all is specified, fetch a list of all user-created databases from the + * source server. + */ The prologue of this function shouldn't mention --all and --database option as it doesn't deal with those option itself. I would just say "Fetch a list of all not-template databases from the source server. /* Any non-option arguments? */ if (optind < argc) { @@ -2202,14 +2280,20 @@ main(int argc, char **argv) pg_log_info("validating subscriber connection string"); sub_base_conninfo = get_sub_conninfo(&opt); - if (opt.database_names.head == NULL) + /* + * Fetch all databases from the source (publisher) if --all is specified. Add the relevant parts from fetch_source_databases() prologue here. That is, just add, "This is treated as if the user specified multiple --database options, one for each source database.". + */ + if (opt.all_dbs) + fetch_source_databases(&opt); + extra line, not needed This looks mostly ready except the test changes. I believe when committing, we are going to squash all three into a single commit. Is that correct? On Tue, Mar 25, 2025 at 4:37 PM Shubham Khanna <khannashubham1...@gmail.com> wrote: > > On Tue, Mar 25, 2025 at 4:31 PM Ashutosh Bapat > <ashutosh.bapat....@gmail.com> wrote: > > > > On Tue, Mar 25, 2025 at 4:28 PM Shubham Khanna > > <khannashubham1...@gmail.com> wrote: > > > > > > > > The attached patches contain the suggested changes. > > > [1] - > > > https://www.postgresql.org/message-id/CAA4eK1KUDEO0t6i16_CcEpg33sgcgEddHcdVC_q8j4tVUb5FWw%40mail.gmail.com > > > > Forgot to attach patches? > > > > -- > > Apologies for the oversight. I have attached the patches now. Please > find them included here. > > Thanks and regards, > Shubham Khanna. -- Best Wishes, Ashutosh Bapat