You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A couple of ereports were making use of StringInfos as temporary storage
for the portions of the WARNING message. One was doing this to avoid
having 2 separate ereports. This was all fairly unnecessary and
resulted in more code rather than less code.
Refactor out the additional StringInfos and make
check_publications_origin_tables() use 2 ereports.
In passing, adjust pubnames to become a stack-allocated StringInfoData to
avoid having to palloc the temporary StringInfoData. This follows on
from the efforts made in 6d0eba6.
Author: Mats Kindahl <[email protected]>
Reviewed-by: David Rowley <[email protected]>
Reviewed-by: Amit Kapila <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: https://postgr.es/m/0b381b02-cab9-41f9-a900-ad6c8d26c1fc%40gmail.com
errmsg("subscription \"%s\" requested copy_data with origin = NONE but might copy data that had a different origin",
2612
+
subname),
2613
+
errdetail_plural("The subscription subscribes to a publication (%s) that contains tables that are written to by other subscriptions.",
2614
+
"The subscription subscribes to publications (%s) that contain tables that are written to by other subscriptions.",
2615
+
list_length(publist), pubnames.data),
2616
+
errhint("Verify that initial data copied from the publisher tables did not come from other origins."));
2615
2617
else
2616
-
{
2617
-
appendStringInfo(err_msg, _("subscription \"%s\" enabled retain_dead_tuples but might not reliably detect conflicts for changes from different origins"),
2618
-
subname);
2619
-
appendStringInfoString(err_hint, _("Consider using origin = NONE or disabling retain_dead_tuples."));
0 commit comments