misleading comments in pgbench

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема misleading comments in pgbench
Дата
Msg-id f67928030910232009u5072bcaeoec0b58afe5fa3d9@mail.gmail.com
обсуждение исходный текст
Ответы Re: misleading comments in pgbench  (Tatsuo Ishii <ishii@postgresql.org>)
Список pgsql-hackers
From contrib/pgbench/pgbench.c starting in revision 1.77
    * Note: TPC-B requires at least 100 bytes per row, and the "filler"    * fields in these table declarations were
intendedto comply with that.    * But because they default to NULLs, they don't actually take any    * space.  We could
fixthat by giving them non-null default values.    * However, that would completely break comparability of pgbench    *
resultswith prior versions.  Since pgbench has never pretended    * to be fully TPC-B compliant anyway, we stick with
thehistorical    * behavior.
 

The statement about NULLs applies to the other 3 tables, but
pgbench_accounts.filler is loaded (via COPY) as empty strings, not as
NULLs.  When stored into char(84), the empty string takes the full
specified storage.  So on my system, rows in pgbench_accounts take up
about 130 bytes, rather than than the about 40 they would with a NULL.

The behavior probably won't be changed, but the code comment probably
should be.  Sorry if this seems like picayune thing, but it led to a
bit of head scratching until I figured it out.

Cheers,

Jeff


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Statement Level Deferred Triggers
Следующее
От: Stefan Moeding
Дата:
Сообщение: Re: per table random-page-cost?