From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql: Track block level checksum failures in pg_stat_database |
Date: | 2019-04-30 22:48:58 |
Message-ID: | CAOBaU_Y3hT33ps_KXYmyLqBDQx4PSS8nWe4W+jnLfiQaXd0wZw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Tue, Apr 30, 2019 at 11:56 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Julien Rouhaud <rjuju123(at)gmail(dot)com> writes:
> > On Tue, Apr 30, 2019 at 6:33 PM Tomas Vondra
> > <tomas(dot)vondra(at)2ndquadrant(dot)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.
Right, I was also wondering why there wasn't compile error in such
case. I'll send an updated patch tomorrow, as I usually regret any
code I write after midnight.
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2019-04-30 23:32:01 | pgsql: Improve comment spelling and style in llvmjit_deform.c. |
Previous Message | Tom Lane | 2019-04-30 21:56:47 | Re: pgsql: Track block level checksum failures in pg_stat_database |