Dear Amit,
Again, thank you for reviewing! New patch is available in [1].
> 2.
> + /*
> + * Store the names of output plugins as well. There is a possibility
> + * that duplicated plugins are set, but the consumer function
> + * check_loadable_libraries() will avoid checking the same library, so
> + * we do not have to consider their uniqueness here.
> + */
> + for (slotno = 0; slotno < slot_arr->nslots; slotno++)
> + {
> + os_info.libraries[totaltups].name = pg_strdup(slot_arr->slots[slotno].plugin);
>
> Here, we should ignore invalid slots.
"continue" was added.
> 3.
> + if (!live_check && !slot->caught_up)
> + {
> + if (script == NULL &&
> + (script = fopen_priv(output_path, "w")) == NULL)
> + pg_fatal("could not open file \"%s\": %s",
> + output_path, strerror(errno));
> +
> + fprintf(script,
> + "The slot \"%s\" has not consumed the WAL yet\n",
> + slot->slotname);
>
> Is it possible to print the LSN locations of slot and last checkpoint?
> I think that will aid in debugging the problems if any and could be
> helpful to users as well.
Based on recent discussion, I'm not sure we should output the actual LSN here.
(We do not check latect checkpoint anymore)
If you still think it should be, please tell me again.
[1]:
https://www.postgresql.org/message-id/TYAPR01MB5866D63A6460059DC661BF62F5F6A%40TYAPR01MB5866.jpnprd01.prod.outlook.com
Best Regards,
Hayato Kuroda
FUJITSU LIMITED