Fix union for pgstat message types
authorMagnus Hagander <magnus@hagander.net>
Wed, 1 May 2019 10:30:44 +0000 (12:30 +0200)
committerMagnus Hagander <magnus@hagander.net>
Wed, 1 May 2019 10:30:44 +0000 (12:30 +0200)
commit659e53498c3c04e4f400323c02bef98fe8d13ec8
tree47ea71dd3b142be99c1286000d12bff0da058e52
parent809c9b48f4bdd11dfc088f6d0b9a6c57936c32ca
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
src/backend/postmaster/pgstat.c
src/include/pgstat.h