fix_PGSTAT_NUM_TABENTRIES_macro patch - Mailing list pgsql-hackers

From Mark Dilger
Subject fix_PGSTAT_NUM_TABENTRIES_macro patch
Date
Msg-id 1388467593.19406.YahooMailNeo@web125404.mail.ne1.yahoo.com
Whole thread Raw
Responses Re: fix_PGSTAT_NUM_TABENTRIES_macro patch
List 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

pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Proposal: variant of regclass
Next
From: Peter Geoghegan
Date:
Subject: Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE