Re: WAL usage calculation patch - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: WAL usage calculation patch
Date
Msg-id CAA4eK1+iNDJVFtALq8WOFkgYwuv5tAYQsR_WmZsai64hXTjaXg@mail.gmail.com
Whole thread Raw
In response to Re: WAL usage calculation patch  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: WAL usage calculation patch  (Dilip Kumar <dilipbalaut@gmail.com>)
List pgsql-hackers
On Wed, Apr 1, 2020 at 4:29 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> v9-0005-Keep-track-of-WAL-usage-in-pg_stat_statements
>

One more comment related to this patch.
+
+ snprintf(buf, sizeof buf, UINT64_FORMAT, tmp.wal_bytes);
+
+ /* Convert to numeric. */
+ wal_bytes = DirectFunctionCall3(numeric_in,
+ CStringGetDatum(buf),
+ ObjectIdGetDatum(0),
+ Int32GetDatum(-1));
+
+ values[i++] = wal_bytes;

I see that other places that display uint64 values use BIGINT datatype
in SQL, so why can't we do the same here?  See the usage of queryid in
pg_stat_statements or internal_pages, *_pages exposed via
pgstatindex.c.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: WAL usage calculation patch
Next
From: Fujii Masao
Date:
Subject: Re: recovery_target_action=pause with confusing hint