From: | Mark Dilger <markdilger(at)yahoo(dot)com> |
---|---|
To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | fix_PGSTAT_NUM_TABENTRIES_macro patch |
Date: | 2013-12-31 05:26:33 |
Message-ID: | 1388467593.19406.YahooMailNeo@web125404.mail.ne1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
In src/include/pgstat.h, the PGSTAT_NUM_TABENTRIES macro
attempts to subtract off the size of the PgStat_MsgTabstat
struct up to the m_entry[] field. This macro was correct up
until the fields m_block_read_time and m_block_write_time
were added to that struct, as the macro was not changed to
include their size.
This patch fixes the macro.
As an aside, the PGSTAT_MSG_PAYLOAD define from which
these field sizes are being subtracted is a bit of a WAG, if
I am reading the code correctly, in which case whether the
two additional fields are subtracted from that WAG is perhaps
not critical. But the code is certainly easier to understand if
the macro matches the definition of the struct.
Mark Dilger
Attachment | Content-Type | Size |
---|---|---|
fix_PGSTAT_NUM_TABENTRIES_macro | application/octet-stream | 463 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2013-12-31 07:18:24 | Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE |
Previous Message | Tatsuo Ishii | 2013-12-31 04:58:42 | Re: Proposal: variant of regclass |