Re: Log a warning in pg_createsubscriber for max_slot_wal_keep_size

Shlok Kyal <shlok.kyal.oss@gmail.com>

From: Shlok Kyal <shlok.kyal.oss@gmail.com>
To: Shubham Khanna <khannashubham1197@gmail.com>
Cc: Peter Smith <smithpb2250@gmail.com>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, vignesh C <vignesh21@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-01-16T06:42:25Z
Lists: pgsql-hackers
On Thu, 16 Jan 2025 at 10:48, Shubham Khanna
<khannashubham1197@gmail.com> wrote:
>
> On Wed, Jan 15, 2025 at 3:28 AM Peter Smith <smithpb2250@gmail.com> wrote:
> >
> > Hi Shubham.
> >
> > Patch v9-0001 LGTM.
> >
>
> Upon reviewing the v9-0001 patch, I noticed that running 'pg perltidy'
> was necessary. To ensure the patch adheres to the required coding
> standards, I have applied 'pg perltidy' and made the necessary
> adjustments.
> The attached patch includes these formatting fixes along with the
> latest changes.
>
Hi Shubham,

I reviewed the v10 patch. I have following comments:

1. The documentation is added under the prerequisite section. And the
prerequisite section states that
   ' There are some prerequisites for
    <application>pg_createsubscriber</application> to convert the target server
    into a logical replica.  If these are not met, an error will be reported.'

But for our case we are giving a warning only during the dry run. So,
I feel we should add the documentation under the 'Warnings' section.

2. Spacing is not consistent with the rest of document:

+   Replication failures can occur if required WAL files are missing. To prevent
+   this, the source server must set <xref
linkend="guc-max-slot-wal-keep-size"/>
+   to <literal>-1</literal> to ensure that required WAL files are not
+   prematurely removed.

For the above added line, we should add a space before each line.

Thanks and Regards,
Shlok Kyal



Commits

  1. Raise a WARNING for max_slot_wal_keep_size in pg_createsubscriber.

  2. Improve grammar of options for command arrays in TAP tests