Re: Rename sync_error_count to tbl_sync_error_count in subscription statistics

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Amit Kapila <amitkapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Subject: Re: Rename sync_error_count to tbl_sync_error_count in subscription statistics
Date: 2025-11-12 23:01:09
Message-ID: CAHut+PttP2j-FOGtuowe5xr=gO4vABU05JPHbTiSpgf1tY8bbg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 12, 2025 at 4:04 PM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>
> On Wed, Nov 12, 2025 at 9:54 AM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> >
> > Hi,
> >
> > This patch proposes renaming a column in the view
> > pg_stat_subscription_stats to disambiguate between table sync and
> > sequence sync error counts. With the introduction of
> > seq_sync_error_count, the existing column name sync_error_count
> > becomes ambiguous, it's unclear whether it refers to tables,
> > sequences, or both. Renaming it to tbl_sync_error_count makes the
> > meaning explicit: it represents errors that occurred during table
> > synchronization. This helps users avoid confusion when interpreting
> > the view's output.
>
> +1 on the intent. It will definitely help avoid confusion in the names.
>
> I’m slightly leaning toward using 'table_sync_error_count' instead of
> 'tbl_sync_error_count'. The name 'table_sync_error_count' isn’t too
> long and should work fine, while 'tbl_..' feels more like an internal
> variable name. But I would like to see what others prefer here.
>

+1 to use 'table' instead of 'tbl'.

~~

But, I was thinking about different naming convention. Since the
proposal will already change the member, then this is probably my last
chance to propose this slighty different approach, so I'm just putting
it out there to see what people think.

Background -- there are the following counters:
1x "apply" error counter
2x "synchronization" error counters
7x "conflict" error counters

IMO it would be better for the "synchronization" error counters to
have a common "sync_" prefix; this is consistent with all the
"conflict" counters having a "confl_" prefix.

e.g.

CURRENT
seq_sync_error_count
sync_error_count

MY SUGGESTION
sync_seq_error_count
sync_table_error_count

~~

Thoughts?

======
Kind Regards,
Peter Smith.
Fujitsu Australia

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2025-11-12 23:03:11 Re: Serverside SNI support in libpq
Previous Message Jacob Champion 2025-11-12 22:50:36 Re: Serverside SNI support in libpq