Fix union for pgstat message types

Magnus Hagander <magnus@hagander.net>

Commit: 659e53498c3c04e4f400323c02bef98fe8d13ec8
Author: Magnus Hagander <magnus@hagander.net>
Date: 2019-05-01T10:30:44Z
Releases: 12.0
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

Files

PathChange+/−
src/backend/postmaster/pgstat.c modified +22 −19
src/include/pgstat.h modified +3 −1

Discussion

Cited messages not in the archive: 20190430163328.zd4rrlnbvgaqlcdz@development