RE: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility. - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.
Date
Msg-id OSCPR01MB1496689B1F157DAD598F9E035F5F72@OSCPR01MB14966.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.  (Shlok Kyal <shlok.kyal.oss@gmail.com>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Vladlen Popolitov
Date:
Subject: Re: Make COPY format extendable: Extract COPY TO format implementations
Next
From: Peter Smith
Date:
Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation