From 659e53498c3c04e4f400323c02bef98fe8d13ec8 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Wed, 1 May 2019 12:30:44 +0200 Subject: 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/include/pgstat.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/include/pgstat.h') diff --git a/src/include/pgstat.h b/src/include/pgstat.h index fa5dca3b87..9fbc492530 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -560,7 +560,7 @@ typedef union PgStat_Msg PgStat_MsgResetcounter msg_resetcounter; PgStat_MsgResetsharedcounter msg_resetsharedcounter; PgStat_MsgResetsinglecounter msg_resetsinglecounter; - PgStat_MsgAutovacStart msg_autovacuum; + PgStat_MsgAutovacStart msg_autovacuum_start; PgStat_MsgVacuum msg_vacuum; PgStat_MsgAnalyze msg_analyze; PgStat_MsgArchiver msg_archiver; @@ -569,6 +569,8 @@ typedef union PgStat_Msg PgStat_MsgFuncpurge msg_funcpurge; PgStat_MsgRecoveryConflict msg_recoveryconflict; PgStat_MsgDeadlock msg_deadlock; + PgStat_MsgTempFile msg_tempfile; + PgStat_MsgChecksumFailure msg_checksumfailure; } PgStat_Msg; -- cgit v1.2.3