Dear Shlok,
> 4. Instead of warning we should throw an error here:
> + if (PQresultStatus(res) != PGRES_TUPLES_OK)
> + {
> + pg_log_warning("could not obtain publication information: %s",
> + PQresultErrorMessage(res));
> +
I don't think so. ERROR evokes user to retry the command or recreate the physical
replica, but the conversion has already been finished when drop_all_publications()
is called. Cleanup operations should not affect the final result.
drop_primary_replication_slot() and drop_failover_replication_slots() raise WARNING
when they fail to drop objects because they are just cleanup functions.
I feel we can follow this manner.
Best regards,
Hayato Kuroda
FUJITSU LIMITED