Re: making relfilenodes 56 bits

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: making relfilenodes 56 bits
Дата
Msg-id 20220729181253.jg6mjfoezznzgfor@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: making relfilenodes 56 bits  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: making relfilenodes 56 bits  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 2022-Jul-29, Robert Haas wrote:

> I was taught that when programming in C one should avoid returning a
> struct type, as BufTagGetRelFileLocator does.

Doing it like that helps RelFileLocatorSkippingWAL, which takes a bare
RelFileLocator as argument.  With this coding you can call one function
with the other function as its argument.

However, with the current definition of relpathbackend() and siblings,
it looks quite disastrous -- BufTagGetRelFileLocator is being called
three times.  You could argue that a solution would be to turn those
macros into static inline functions.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"I'm impressed how quickly you are fixing this obscure issue. I came from 
MS SQL and it would be hard for me to put into words how much of a better job
you all are doing on [PostgreSQL]."
 Steve Midgley, http://archives.postgresql.org/pgsql-sql/2008-08/msg00000.php



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Oversight in slab.c SlabContextCreate(), initial memory allocation size is not populated to context->mem_allocated
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: Oversight in slab.c SlabContextCreate(), initial memory allocation size is not populated to context->mem_allocated