From 4be9356a8a265696c8916f90cf348a63f544860e Mon Sep 17 00:00:00 2001 From: Amanda McCann Date: Mon, 7 Jul 2025 14:43:04 +0200 Subject: [PATCH 1/2] Log message improvement This log message implies all these changes will be applied. But with high lag, that might not happen. Clarify the log message --- scripts/osm2pgsql-replication | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/osm2pgsql-replication b/scripts/osm2pgsql-replication index 297084140..3cc31037f 100755 --- a/scripts/osm2pgsql-replication +++ b/scripts/osm2pgsql-replication @@ -517,7 +517,7 @@ def update(props, args): return 0 remote_server_age_sec = int((dt.datetime.now(dt.timezone.utc) - current.timestamp).total_seconds()) - LOG.debug("Applying %d sequence(s) (%d → %d), covering %s (%s sec) of changes (%s → %s)", + LOG.debug("Need to apply %d sequence(s) (%d → %d), covering %s (%s sec) of changes (%s → %s)", current.sequence - seq, current.sequence, seq, pretty_format_timedelta((current.timestamp - ts).total_seconds()), int((current.timestamp - ts).total_seconds()), From 1c5a607890cb5cd99995ffc114e4ab02d3791658 Mon Sep 17 00:00:00 2001 From: Amanda McCann Date: Mon, 7 Jul 2025 14:47:54 +0200 Subject: [PATCH 2/2] =?UTF-8?q?correct=20log=20message=20(to=E2=86=92from)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The order of “previous seq num” & “current seq num” were incorrect --- scripts/osm2pgsql-replication | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/osm2pgsql-replication b/scripts/osm2pgsql-replication index 3cc31037f..c99c95217 100755 --- a/scripts/osm2pgsql-replication +++ b/scripts/osm2pgsql-replication @@ -518,7 +518,7 @@ def update(props, args): remote_server_age_sec = int((dt.datetime.now(dt.timezone.utc) - current.timestamp).total_seconds()) LOG.debug("Need to apply %d sequence(s) (%d → %d), covering %s (%s sec) of changes (%s → %s)", - current.sequence - seq, current.sequence, seq, + current.sequence - seq, seq, current.sequence, pretty_format_timedelta((current.timestamp - ts).total_seconds()), int((current.timestamp - ts).total_seconds()), osm_date(ts.astimezone(dt.timezone.utc)),