pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Track total number of WAL records, FPIs and bytes generated in t
3+ messages / 3 participants
[nested] [flat]

Commits from this thread:
  2020-12-08 4e43ee88c2  Bump catversion for pg_stat_wal changes.
* pgsql: Track total number of WAL records, FPIs and bytes generated in t
@ 2020-12-02 04:04 Fujii Masao <fujii@postgresql.org>
  2020-12-07 18:56 ` Re: pgsql: Track total number of WAL records, FPIs and bytes generated in t Andres Freund <andres@anarazel.de>
  0 siblings, 1 reply; 3+ messages in thread

From: Fujii Masao @ 2020-12-02 04:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Track total number of WAL records, FPIs and bytes generated in the cluster.

Commit 6b466bf5f2 allowed pg_stat_statements to track the number of
WAL records, full page images and bytes that each statement generated.
Similarly this commit allows us to track the cluster-wide WAL statistics
counters.

New columns wal_records, wal_fpi and wal_bytes are added into the
pg_stat_wal view, and reports the total number of WAL records,
full page images and bytes generated in the , respectively.

Author: Masahiro Ikeda
Reviewed-by: Amit Kapila, Movead Li, Kyotaro Horiguchi, Fujii Masao
Discussion: https://postgr.es/m/35ef960128b90bfae3b3fdf60a3a860f@oss.nttdata.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/01469241b2ff6f17fc0b3f20f01559145ffab29e

Modified Files
--------------
doc/src/sgml/monitoring.sgml         | 27 +++++++++++++++++++++++++
src/backend/catalog/system_views.sql |  3 +++
src/backend/postmaster/pgstat.c      | 38 ++++++++++++++++++++++++++++++++++++
src/backend/utils/adt/pgstatfuncs.c  | 27 ++++++++++++++++++++-----
src/include/catalog/pg_proc.dat      |  5 +++--
src/include/pgstat.h                 |  6 ++++++
src/test/regress/expected/rules.out  |  7 +++++--
7 files changed, 104 insertions(+), 9 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Track total number of WAL records, FPIs and bytes generated in t
  2020-12-02 04:04 pgsql: Track total number of WAL records, FPIs and bytes generated in t Fujii Masao <fujii@postgresql.org>
@ 2020-12-07 18:56 ` Andres Freund <andres@anarazel.de>
  2020-12-08 11:59   ` Re: pgsql: Track total number of WAL records, FPIs and bytes generated in t Fujii Masao <masao.fujii@oss.nttdata.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Andres Freund @ 2020-12-07 18:56 UTC (permalink / raw)
  To: Fujii Masao <fujii@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org

Hi,

On 2020-12-02 04:04:57 +0000, Fujii Masao wrote:
> Track total number of WAL records, FPIs and bytes generated in the cluster.
> 
> Commit 6b466bf5f2 allowed pg_stat_statements to track the number of
> WAL records, full page images and bytes that each statement generated.
> Similarly this commit allows us to track the cluster-wide WAL statistics
> counters.
> 
> New columns wal_records, wal_fpi and wal_bytes are added into the
> pg_stat_wal view, and reports the total number of WAL records,
> full page images and bytes generated in the , respectively.
> 
> Author: Masahiro Ikeda
> Reviewed-by: Amit Kapila, Movead Li, Kyotaro Horiguchi, Fujii Masao
> Discussion: https://postgr.es/m/35ef960128b90bfae3b3fdf60a3a860f@oss.nttdata.com


This is missing a catversion bump, due to the changes in view
names. Noticed that because I got errors like
 -- There must be only one record
 select count(*) = 1 as ok from pg_stat_wal;
- ok 
-----
- t
-(1 row)
-
+ERROR:  function return row and query-specified return row do not match
+DETAIL:  Returned row contains 5 attributes, but query expects 2.
 -- This is to record the prevailing planner enable_foo settings during
 -- a regression test run.

when running tests against a pre-existing cluster after rebasing a
development tree.

Greetings,

Andres Freund





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Track total number of WAL records, FPIs and bytes generated in t
  2020-12-02 04:04 pgsql: Track total number of WAL records, FPIs and bytes generated in t Fujii Masao <fujii@postgresql.org>
  2020-12-07 18:56 ` Re: pgsql: Track total number of WAL records, FPIs and bytes generated in t Andres Freund <andres@anarazel.de>
@ 2020-12-08 11:59   ` Fujii Masao <masao.fujii@oss.nttdata.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Fujii Masao @ 2020-12-08 11:59 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; Fujii Masao <fujii@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org



On 2020/12/08 3:56, Andres Freund wrote:
> Hi,
> 
> On 2020-12-02 04:04:57 +0000, Fujii Masao wrote:
>> Track total number of WAL records, FPIs and bytes generated in the cluster.
>>
>> Commit 6b466bf5f2 allowed pg_stat_statements to track the number of
>> WAL records, full page images and bytes that each statement generated.
>> Similarly this commit allows us to track the cluster-wide WAL statistics
>> counters.
>>
>> New columns wal_records, wal_fpi and wal_bytes are added into the
>> pg_stat_wal view, and reports the total number of WAL records,
>> full page images and bytes generated in the , respectively.
>>
>> Author: Masahiro Ikeda
>> Reviewed-by: Amit Kapila, Movead Li, Kyotaro Horiguchi, Fujii Masao
>> Discussion: https://postgr.es/m/35ef960128b90bfae3b3fdf60a3a860f@oss.nttdata.com
> 
> 
> This is missing a catversion bump, due to the changes in view
> names. Noticed that because I got errors like
>   -- There must be only one record
>   select count(*) = 1 as ok from pg_stat_wal;
> - ok
> -----
> - t
> -(1 row)
> -
> +ERROR:  function return row and query-specified return row do not match
> +DETAIL:  Returned row contains 5 attributes, but query expects 2.
>   -- This is to record the prevailing planner enable_foo settings during
>   -- a regression test run.
> 
> when running tests against a pre-existing cluster after rebasing a
> development tree.

Thanks for reporting this! You are right.
Sorry I forgot to bump that. I will do that.

Regards,

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





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2020-12-08 11:59 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02 04:04 pgsql: Track total number of WAL records, FPIs and bytes generated in t Fujii Masao <fujii@postgresql.org>
2020-12-07 18:56 ` Andres Freund <andres@anarazel.de>
2020-12-08 11:59   ` Fujii Masao <masao.fujii@oss.nttdata.com>

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