From: | Shubham Khanna <khannashubham1197(at)gmail(dot)com> |
---|---|
To: | Peter Smith <smithpb2250(at)gmail(dot)com> |
Cc: | Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Log a warning in pg_createsubscriber for max_slot_wal_keep_size |
Date: | 2025-01-23 13:11:52 |
Message-ID: | CAHv8RjKmz6HKjESRBohwy2DgFs09Li6m0jE1FeDs2V=XFXZfCg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jan 23, 2025 at 12:30 PM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> Hi Shubham.
>
> The v12-0001 works OK, but your added TAP tests of this patch do not
> conform to the new style of the fat-comma parameter passing since the
> recent commit [1], so you'll need to fix them so they do...
>
> ======
> src/bin/pg_basebackup/t/040_pg_createsubscriber.pl
>
> 1.
> +command_checks_all(
> + [
> + 'pg_createsubscriber', '--verbose',
> + '--verbose', '--recovery-timeout',
> + "$PostgreSQL::Test::Utils::timeout_default", '--dry-run',
> + '--pgdata', $node_s->data_dir,
> + '--publisher-server', $node_p->connstr($db1),
> + '--socketdir', $node_s->host,
> + '--subscriber-port', $node_s->port,
> + '--publication', 'pub1',
> + '--publication', 'pub2',
> + '--subscription', 'sub1',
> + '--subscription', 'sub2',
> + '--database', $db1,
> + '--database', $db2
> + ],
>
>
> 1a.
> Fix the formatting. e.g. Look at master for example what new style
> parameters look like and make yours look the same.
>
> ~
>
> 1b.
> Here I think we don't really any --verbose at all because AFAIK
> command_checks_all is not producing any output we can look at anyhow.
>
> ~~~
>
> 2.
> +# And, same again to see the output...
> command_ok(
> [
> - 'pg_createsubscriber',
> - '--verbose',
> - '--dry-run',
> - '--recovery-timeout' => $PostgreSQL::Test::Utils::timeout_default,
> - '--pgdata' => $node_s->data_dir,
> - '--publisher-server' => $node_p->connstr($db1),
> - '--socketdir' => $node_s->host,
> - '--subscriber-port' => $node_s->port,
> - '--publication' => 'pub1',
> - '--publication' => 'pub2',
> - '--subscription' => 'sub1',
> - '--subscription' => 'sub2',
> - '--database' => $db1,
> - '--database' => $db2,
> + 'pg_createsubscriber', '--verbose',
> + '--verbose', '--recovery-timeout',
> + "$PostgreSQL::Test::Utils::timeout_default", '--dry-run',
> + '--pgdata', $node_s->data_dir,
> + '--publisher-server', $node_p->connstr($db1),
> + '--socketdir', $node_s->host,
> + '--subscriber-port', $node_s->port,
> + '--publication', 'pub1',
> + '--publication', 'pub2',
> + '--subscription', 'sub1',
> + '--subscription', 'sub2',
> + '--database', $db1,
> + '--database', $db2
> ],
>
> 2a.
> +# And, same again to see the output...
>
> Maybe a better comment is more like
>
> # Execute the same command again but this time use 'command_ok' so
> that the log files can be inspected.
>
> ~
>
> 2b.
> Fix the formatting. Look at master for example what new style
> parameters look like and make yours look the same.
>
> ~
>
> 2c.
> Include some comment (like exists elsewhere in this file) to say
> "--verbose is used twice to show more information.", otherwise readers
> could be tempted to think the double --verbose is a mistake.
>
> ~~~
>
> 3.
> Rerun perltidy (the correct version) to ensure the formatting is
> stable and good.
>
> ======
Fixed the given comments. The attached patch contains the suggested changes.
Thanks and regards,
Shubham Khanna.
Attachment | Content-Type | Size |
---|---|---|
v13-0001-Validate-max_slot_wal_keep_size-in-pg_createsubs.patch | application/octet-stream | 7.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jelte Fennema-Nio | 2025-01-23 13:17:43 | Re: New process of getting changes into the commitfest app |
Previous Message | Sergey Tatarintsev | 2025-01-23 13:03:12 | Re: create subscription with (origin = none, copy_data = on) |