Remove unused 'len' from pg_stat_recv_* functions

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: houzj(dot)fnst(at)fujitsu(dot)com
Subject: Remove unused 'len' from pg_stat_recv_* functions
Date: 2021-08-03 03:40:23
Message-ID: CAD21AoAnDi9JBmzjy0L5G8oq4P6zGdY75g=NJx+PeQL3vzPArg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

While working on a patch adding new stats, houzj pointed out that
'len' function arguments of all pgstat_recv_* functions are not used
at all. Looking at git history, pgstat_recv_* functions have been
having ‘len’ since the stats collector was introduced by commit
140ddb78fe 20 years ago but it was not used at all even in the first
commit. It seems like the improvements so far for the stats collector
had pgstat_recv_* function have ‘len’ for consistency with the
existing pgstat_recv_* functions. Is there any historical reason for
having 'len' argument? Or can we remove them?

I've attached the patch that removes 'len' from all pgstat_recv_* functions.

Regards,

--
Masahiko Sawada
EDB: https://www.enterprisedb.com/

Attachment Content-Type Size
remove_len_from_pgstat_recv.patch application/octet-stream 14.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2021-08-03 04:03:29 Sort keys are omitted incorrectly after grouping sets
Previous Message Peter Smith 2021-08-03 03:22:24 Re: row filtering for logical replication