fix_PGSTAT_NUM_TABENTRIES_macro patch

Поиск
Список
Период
Сортировка
От Mark Dilger
Тема fix_PGSTAT_NUM_TABENTRIES_macro patch
Дата
Msg-id 1388467593.19406.YahooMailNeo@web125404.mail.ne1.yahoo.com
обсуждение исходный текст
Ответы Re: fix_PGSTAT_NUM_TABENTRIES_macro patch
Список 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




Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Proposal: variant of regclass
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE