Re: Detoasting and memory usage

Поиск
Список
Период
Сортировка
От apb18@cornell.edu
Тема Re: Detoasting and memory usage
Дата
Msg-id Pine.SOL.3.91.1030721103341.21079U@travelers.mail.cornell.edu
обсуждение исходный текст
Ответ на Re: Detoasting and memory usage  (Joe Conway <mail@joeconway.com>)
Список pgsql-general
Hmm.. I can't believe I missed that.  While that exact macro wouldn't
apply in my situation (because I fetch the value from a field in a tuple and
not the argument of a function), the underlying concept is the same as
what I would need.   Now I do not need to feel the wrath of unnecessary
memory allocation/deallocation for the non-toasted case.  Excellent.
Thanks very much!

    -Aaron

> #define PG_FREE_IF_COPY(ptr,n) \
>      do { \
>          if ((Pointer) (ptr) != PG_GETARG_POINTER(n)) \
>              pfree(ptr); \
>      } while (0)
>
> Maybe you can use that or do something similar?
>
> HTH,
>
> Joe

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Checkpoint question
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: Fw: Is SQL silly as an RDBMS<->app interface?