Data type correction in pgstat_report_replslot function parameters

Started by vignesh Cover 5 years ago6 messageshackers
Jump to latest
#1vignesh C
vignesh21@gmail.com

Hi,

While I was reviewing replication slot statistics code, I found one
issue in the data type used for pgstat_report_replslot function
parameters. We pass int64 variables to the function but the function
prototype uses int type. I I felt the function parameters should be
int64. Attached patch fixes the same.
Thoughts?

Regards,
Vignesh

Attachments:

v1-0001-Data-type-correction-in-pgstat_report_replslot.patchtext/x-patch; charset=US-ASCII; name=v1-0001-Data-type-correction-in-pgstat_report_replslot.patchDownload+7-5
#2Jeevan Ladhe
jeevan.ladhe@enterprisedb.com
In reply to: vignesh C (#1)
Re: Data type correction in pgstat_report_replslot function parameters

On Thu, Apr 1, 2021 at 10:20 PM vignesh C <vignesh21@gmail.com> wrote:

Hi,

While I was reviewing replication slot statistics code, I found one
issue in the data type used for pgstat_report_replslot function
parameters. We pass int64 variables to the function but the function
prototype uses int type. I I felt the function parameters should be
int64. Attached patch fixes the same.

+1 for the change. The patch LGTM.

Regards,
Jeevan Ladhe

#3Fujii Masao
masao.fujii@oss.nttdata.com
In reply to: Jeevan Ladhe (#2)
Re: Data type correction in pgstat_report_replslot function parameters

On 2021/04/02 2:18, Jeevan Ladhe wrote:

On Thu, Apr 1, 2021 at 10:20 PM vignesh C <vignesh21@gmail.com <mailto:vignesh21@gmail.com>> wrote:

Hi,

While I was reviewing replication slot statistics code, I found one
issue in the data type used for pgstat_report_replslot function
parameters. We pass int64 variables to the function but the function
prototype uses int type. I I felt the function parameters should be
int64. Attached patch fixes the same.

Isn't it better to use PgStat_Counter instead of int64?

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

#4vignesh C
vignesh21@gmail.com
In reply to: Fujii Masao (#3)
Re: Data type correction in pgstat_report_replslot function parameters

On Thu, Apr 1, 2021 at 11:18 PM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:

On 2021/04/02 2:18, Jeevan Ladhe wrote:

On Thu, Apr 1, 2021 at 10:20 PM vignesh C <vignesh21@gmail.com <mailto:vignesh21@gmail.com>> wrote:

Hi,

While I was reviewing replication slot statistics code, I found one
issue in the data type used for pgstat_report_replslot function
parameters. We pass int64 variables to the function but the function
prototype uses int type. I I felt the function parameters should be
int64. Attached patch fixes the same.

Isn't it better to use PgStat_Counter instead of int64?

Thanks for your comment, the updated patch contains the changes for it.

Regards,
Vignesh

Attachments:

v2-0001-Data-type-correction-in-pgstat_report_replslot.patchtext/x-patch; charset=US-ASCII; name=v2-0001-Data-type-correction-in-pgstat_report_replslot.patchDownload+8-5
#5Fujii Masao
masao.fujii@oss.nttdata.com
In reply to: vignesh C (#4)
Re: Data type correction in pgstat_report_replslot function parameters

On 2021/04/02 11:20, vignesh C wrote:

On Thu, Apr 1, 2021 at 11:18 PM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:

On 2021/04/02 2:18, Jeevan Ladhe wrote:

On Thu, Apr 1, 2021 at 10:20 PM vignesh C <vignesh21@gmail.com <mailto:vignesh21@gmail.com>> wrote:

Hi,

While I was reviewing replication slot statistics code, I found one
issue in the data type used for pgstat_report_replslot function
parameters. We pass int64 variables to the function but the function
prototype uses int type. I I felt the function parameters should be
int64. Attached patch fixes the same.

Isn't it better to use PgStat_Counter instead of int64?

Thanks for your comment, the updated patch contains the changes for it.

Thanks for updating the patch! Pushed.

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

#6vignesh C
vignesh21@gmail.com
In reply to: Fujii Masao (#5)
Re: Data type correction in pgstat_report_replslot function parameters

On Fri, Apr 2, 2021 at 1:59 PM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:

On 2021/04/02 11:20, vignesh C wrote:

On Thu, Apr 1, 2021 at 11:18 PM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:

On 2021/04/02 2:18, Jeevan Ladhe wrote:

On Thu, Apr 1, 2021 at 10:20 PM vignesh C <vignesh21@gmail.com <mailto:vignesh21@gmail.com>> wrote:

Hi,

While I was reviewing replication slot statistics code, I found one
issue in the data type used for pgstat_report_replslot function
parameters. We pass int64 variables to the function but the function
prototype uses int type. I I felt the function parameters should be
int64. Attached patch fixes the same.

Isn't it better to use PgStat_Counter instead of int64?

Thanks for your comment, the updated patch contains the changes for it.

Thanks for updating the patch! Pushed.

Thanks for pushing.

Regards,
Vignesh