summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2025-09-19 04:52:59 +0000
committerAmit Kapila <akapila@postgresql.org>2025-09-19 04:52:59 +0000
commit8aac5923a3611aa89998368a09c54892b93ebdd9 (patch)
tree693c26309c0232530e71b48061a14da7b60de5e6
parentdeb208df4559c922df217354f2c0cb689016a2ed (diff)
Improve few errdetail messages introduced in commit 0d48d393d46.
Based on suggestions by Tom Lane Reported-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Author: Zhijie Hou <houzj.fnst@fujitsu.com> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com> Discussion: https://postgr.es/m/20250916.114644.275726106301941878.horikyota.ntt@gmail.com
-rw-r--r--src/backend/replication/logical/worker.c8
-rw-r--r--src/test/subscription/t/035_conflicts.pl2
2 files changed, 4 insertions, 6 deletions
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index 9b5885d57cf..419e478b4c6 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -4790,8 +4790,7 @@ stop_conflict_info_retention(RetainDeadTuplesData *rdt_data)
ereport(LOG,
errmsg("logical replication worker for subscription \"%s\" has stopped retaining the information for detecting conflicts",
MySubscription->name),
- errdetail("Retention is stopped as the apply process is not advancing its xmin within the configured max_retention_duration of %u ms.",
- MySubscription->maxretention));
+ errdetail("Retention is stopped because the apply process has not caught up with the publisher within the configured max_retention_duration."));
}
Assert(!TransactionIdIsValid(MyLogicalRepWorker->oldest_nonremovable_xid));
@@ -4819,9 +4818,8 @@ resume_conflict_info_retention(RetainDeadTuplesData *rdt_data)
errmsg("logical replication worker for subscription \"%s\" will resume retaining the information for detecting conflicts",
MySubscription->name),
MySubscription->maxretention
- ? errdetail("Retention is re-enabled as the apply process is advancing its xmin within the configured max_retention_duration of %u ms.",
- MySubscription->maxretention)
- : errdetail("Retention is re-enabled as max_retention_duration is set to unlimited."));
+ ? errdetail("Retention is re-enabled because the apply process has caught up with the publisher within the configured max_retention_duration.")
+ : errdetail("Retention is re-enabled because max_retention_duration has been set to unlimited."));
/*
* Restart the worker to let the launcher initialize
diff --git a/src/test/subscription/t/035_conflicts.pl b/src/test/subscription/t/035_conflicts.pl
index a526986c4e4..741f5397478 100644
--- a/src/test/subscription/t/035_conflicts.pl
+++ b/src/test/subscription/t/035_conflicts.pl
@@ -633,7 +633,7 @@ $node_B->reload;
# Confirm that the retention resumes
$node_A->wait_for_log(
qr/logical replication worker for subscription "tap_sub_a_b" will resume retaining the information for detecting conflicts
-.*DETAIL:.* Retention is re-enabled as max_retention_duration is set to unlimited.*/,
+.*DETAIL:.* Retention is re-enabled because max_retention_duration has been set to unlimited.*/,
$log_offset);
ok( $node_A->poll_query_until(