From: Tom Lane <tgl@sss.pgh.pa.us>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Track block level checksum failures in pg_stat_database
Date: Tue, 30 Apr 2019 17:56:47 -0400
Message-ID: <27245.1556661407@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOBaU_Y0oSe=nQLujkj_GD-KKC29rtfUL-Eb66w4a=XaC7rumA@mail.gmail.com>
References: <E1h2h11-0005j3-AE@gemulon.postgresql.org>
<20190430163328.zd4rrlnbvgaqlcdz@development>
<CAOBaU_Y0oSe=nQLujkj_GD-KKC29rtfUL-Eb66w4a=XaC7rumA@mail.gmail.com>
Julien Rouhaud <rjuju123@gmail.com> writes:
> On Tue, Apr 30, 2019 at 6:33 PM Tomas Vondra
> <tomas.vondra@2ndquadrant.com> wrote:
>> It seems this commit forgot to add PgStat_MsgChecksumFailure to the
>> PgStat_Msg union.
> Oops, indeed. That's embarrassing. Trivial fix attached if that helps.
Seems like this exposes a generic weakness in the way pgstat.c is coded.
I'm inclined to adjust the switch logic in PgstatCollectorMain along
the lines of
- pgstat_recv_inquiry((PgStat_MsgInquiry *) &msg, len);
+ pgstat_recv_inquiry(&msg.msg_inquiry, len);
so that you *couldn't* forget to extend the union, as long as you
followed the existing code's style.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, rjuju123@gmail.com, tomas.vondra@2ndquadrant.com, magnus@hagander.net, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Track block level checksum failures in pg_stat_database
In-Reply-To: <27245.1556661407@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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