From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Change data type of counters in BufferUsage and WalUsage from lo
Date: Wed, 12 May 2021 00:57:24 +0000
Message-ID: <E1lgdBk-0000k9-8w@gemulon.postgresql.org> (raw)
Change data type of counters in BufferUsage and WalUsage from long to int64.
Previously long was used as the data type for some counters in BufferUsage
and WalUsage. But long is only four byte, e.g., on Windows, and it's entirely
possible to wrap a four byte counter. For example, emitting more than
four billion WAL records in one transaction isn't actually particularly rare.
To avoid the overflows of those counters, this commit changes the data type
of them from long to int64.
Suggested-by: Andres Freund
Author: Masahiro Ikeda
Reviewed-by: Fujii Masao
Discussion: https://postgr.es/m/20201221211650.k7b53tcnadrciqjo@alap3.anarazel.de
Discussion: https://postgr.es/m/af0964ac-7080-1984-dc23-513754987716@oss.nttdata.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d780d7c0882fe9a385102b292907baaceb505ed0
Modified Files
--------------
src/backend/access/heap/vacuumlazy.c | 6 ++---
src/backend/commands/explain.c | 48 ++++++++++++++++++------------------
src/include/executor/instrument.h | 24 +++++++++---------
3 files changed, 39 insertions(+), 39 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: fujii@postgresql.org
Subject: Re: pgsql: Change data type of counters in BufferUsage and WalUsage from lo
In-Reply-To: <E1lgdBk-0000k9-8w@gemulon.postgresql.org>
References: <E1lgdBk-0000k9-8w@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox