On Tue, Jun 22, 2021 at 6:27 AM Peter Smith <smithpb2250@gmail.com> wrote:
>
> #3. There is another suggestion to use the Stats Collector to hold the
> error message [Amit-2]. For me, this felt like blurring too much the
> distinction between "stats tracking/metrics" and "logs". ERROR logs
> must be flushed, whereas for stats (IIUC) there is no guarantee that
> everything you need to see would be present. Indeed Amit wrote "But in
> this case, if the stats collector missed updating the information, the
> user may have to manually update the subscription and let the error
> happen again to see it." [Amit-3]. Requesting the user to cause the
> same error again just in case it was not captured a first time seems
> too strange to me.
>
I don't think it will often be the case that the stats collector will
miss updating the information. I am not feeling comfortable storing
error information in system catalogs. We have some other views which
capture somewhat similar conflict information
(pg_stat_database_conflicts) or failed transactions information. So, I
thought here we are extending the similar concept by storing some
additional information about errors.
--
With Regards,
Amit Kapila.