pgsql: Fix union for pgstat message types

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix union for pgstat message types
Date: 2019-05-01 10:34:52
Message-ID: E1hLmZg-000556-Uz@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix union for pgstat message types

The message type for temp files and for checksum failures were missing
from the union. Due to the coding style used there was no compiler error
when this happend. So change the code to actively use the union thereby
producing a compiler error if the same mistake happens again, suggested
by Tom Lane.

Author: Julien Rouhaud
Reported-By: Tomas Vondra
Discussion: https://postgr.es/m/20190430163328.zd4rrlnbvgaqlcdz@development

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/659e53498c3c04e4f400323c02bef98fe8d13ec8

Modified Files
--------------
src/backend/postmaster/pgstat.c | 41 ++++++++++++++++++++++-------------------
src/include/pgstat.h | 4 +++-
2 files changed, 25 insertions(+), 20 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Julien Rouhaud 2019-05-01 10:36:39 Re: pgsql: Track block level checksum failures in pg_stat_database
Previous Message Magnus Hagander 2019-05-01 10:34:51 Re: pgsql: Track block level checksum failures in pg_stat_database