Re: Collect statistics about conflicts in logical replication - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Collect statistics about conflicts in logical replication
Date
Msg-id CAA4eK1Kv=iBxTep446e6qUTt7UdKcA6wOL3=14DL7_PBR02EKA@mail.gmail.com
Whole thread Raw
In response to Re: Collect statistics about conflicts in logical replication  (shveta malik <shveta.malik@gmail.com>)
Responses Re: Collect statistics about conflicts in logical replication
List pgsql-hackers
On Wed, Aug 28, 2024 at 11:43 AM shveta malik <shveta.malik@gmail.com> wrote:
>
> Thanks for the patch. Just thinking out loud, since we have names like
> 'apply_error_count', 'sync_error_count' which tells that they are
> actually error-count, will it be better to have something similar in
> conflict-count cases, like 'insert_exists_conflict_count',
> 'delete_missing_conflict_count' and so on. Thoughts?
>

It would be better to have conflict in the names but OTOH it will make
the names a bit longer. The other alternatives could be (a)
insert_exists_confl_count, etc. (b) confl_insert_exists_count, etc.
(c) confl_insert_exists, etc. These are based on the column names in
the existing view pg_stat_database_conflicts [1]. The (c) looks better
than other options but it will make the conflict-related columns
different from error-related columns.

Yet another option is to have a different view like
pg_stat_subscription_conflicts but that sounds like going too far.

[1] - https://www.postgresql.org/docs/devel/monitoring-stats.html#MONITORING-PG-STAT-DATABASE-CONFLICTS-VIEW

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: Conflict Detection and Resolution
Next
From: Robert Haas
Date:
Subject: Re: allowing extensions to control planner behavior