Question about coding of free space map

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Question about coding of free space map
Дата
Msg-id 20140826.111323.42915740668569590.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответы Re: Question about coding of free space map  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-hackers
While looking into backend/storage/freespace/freespace.c, I noticed
that struct FSMAddress is passed to functions by value, rather than
reference. I thought our code practice is defining pointer to a struct
data and using the pointer for parameter passing etc.

typedef struct RelationData *Relation;

IMO freespace.c is better to follow the practice.

Maybe this has been allowed because:

typedef struct
{int            level;            /* level */int            logpageno;        /* page number within the level */
} FSMAddress;

the struct size is 4+4=8 byte, which is same as 64 bit pointer. Still
I think it's better to use pointer to the struct because someday we
may want to add new member to the struct.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp



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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: postgresql latency & bgwriter not doing its job
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Hardening pg_upgrade