Re: [BUGS] json(b)_array_elements use causes very large memory usagewhen also referencing entire json document

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: [BUGS] json(b)_array_elements use causes very large memory usagewhen also referencing entire json document
Дата
Msg-id 20171007012252.ao64svfi3tzslhyq@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: [BUGS] json(b)_array_elements use causes very large memory usage when also referencing entire json document  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On 2017-10-06 20:51:45 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > Hm. Unrelated to the topic at hand, but I wonder how much it'd take to
> > make some of the hot-path jsonb functionality tolerant of unaligned
> > datums.
> 
> Probably pretty hard given the list-of-pointers data structure inside.

Hm, it'd be a bunch of memcpy's added, that's true. But even just doing
something like that to a variant of findJsonbValueFromContainer() might
be quite rewarding.

I'm kinda wondering about treating short datums differently on platforms
that don't care much about alignment, like modern x86. It'd not take
many code changes to only do alignment copying of short datums on
platforms that care...

Greetings,

Andres Freund


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] json(b)_array_elements use causes very large memory usage when also referencing entire json document
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: [BUGS] BUG #14845: postgres_fdw and mysql_fdw can cause crash of instance