Re: Skipping logical replication transactions on subscriber side - Mailing list pgsql-hackers

From Greg Nancarrow
Subject Re: Skipping logical replication transactions on subscriber side
Date
Msg-id CAJcOf-cttcDDP4VrqOmd8gdhne=RiLzd=p2UrBk+4itDuAt+gw@mail.gmail.com
Whole thread Raw
In response to Re: Skipping logical replication transactions on subscriber side  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Skipping logical replication transactions on subscriber side
List pgsql-hackers
On Fri, Nov 19, 2021 at 8:15 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
> Yeah in such a case last_error_time can be shown as a time before
> first_error_time but I don't think that will be a big problem, the
> next message will fix it. I don't see what we can do about it and the
> same is true for other cases like pg_stat_archiver where the success
> and failure times can be out of order. If we want we can remove one of
> those times but I don't think this happens frequently enough to be
> considered a problem. Anyway, these stats are not considered to be
> updated with the most latest info.
>

Couldn't the code block in pgstat_recv_subworker_error() that
increments error_count just compare the new msg timestamp against the
existing first_error_time and last_error_time and, based on the
result, update those if required?

Regards,
Greg Nancarrow
Fujitsu Australia



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Skipping logical replication transactions on subscriber side
Next
From: Amit Kapila
Date:
Subject: Re: Non-superuser subscription owners