From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
Cc: | Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Kirill Bychik <kirill(dot)bychik(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Subject: | Re: WAL usage calculation patch |
Date: | 2020-04-01 11:30:59 |
Message-ID: | CAA4eK1+iNDJVFtALq8WOFkgYwuv5tAYQsR_WmZsai64hXTjaXg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Apr 1, 2020 at 4:29 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2020-04-01 11:45:49 | Re: recovery_target_action=pause with confusing hint |
Previous Message | Amit Kapila | 2020-04-01 10:59:16 | Re: WAL usage calculation patch |