pgsql: This patch reduces the size of the message header used by

Поиск
Список
Период
Сортировка
От neilc@svr1.postgresql.org (Neil Conway)
Тема pgsql: This patch reduces the size of the message header used by
Дата
Msg-id 20050511014141.668D353CE7@svr1.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
This patch reduces the size of the message header used by statistics
collector messages, per recent discussion on pgsql-patches. This
actually required quite a few changes -- for example,
"databaseid != InvalidOid" was used to check whether a slot in the
backend entry table was initialized, but that no longer works since
the slot might be initialized prior to receiving the BESTART message
which contains the database id. We now use procpid > 0 to indicate
that a slot is non-empty.

Other changes:

- various comment improvements and cleanups
- there's no need to zero-out the entire activity buffer in
  pgstat_add_backend(), we can just set activity[0] to '\0'.
- remove the counting of the # of connections to a database; this
  was not used anywhere

One change in behavior I wasn't sure about: previously, the code
would create a hash table entry for a database as soon as any message
was received whose header referenced that database. Now, we only
create hash table entries as needed (so for example BESTART won't
create a database hash table entry, since it doesn't need to
access anything in the per-db hash table). It would be easy enough
to retain the old behavior, but AFAICS it is not required.

Modified Files:
--------------
    pgsql/src/backend/postmaster:
        pgstat.c (r1.93 -> r1.94)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c.diff?r1=1.93&r2=1.94)
    pgsql/src/backend/utils/adt:
        pgstatfuncs.c (r1.21 -> r1.22)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/pgstatfuncs.c.diff?r1=1.21&r2=1.22)
    pgsql/src/include:
        pgstat.h (r1.28 -> r1.29)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/pgstat.h.diff?r1=1.28&r2=1.29)

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

Предыдущее
От: neilc@svr1.postgresql.org (Neil Conway)
Дата:
Сообщение: pgsql: Code cleanup: in C89, there is no point casting the first
Следующее
От: momjian@svr1.postgresql.org (Bruce Momjian)
Дата:
Сообщение: pgsql: Add Chinese FAQ.