Re: BUG #14231: logical replication wal sender process spins when using error traps in function

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: BUG #14231: logical replication wal sender process spins when using error traps in function
Дата
Msg-id CAM3SWZSqBWmJEwu6-aFkN7XkPdybw_nrSfcjNtnJvq8m8-Rcig@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #14231: logical replication wal sender process spins when using error traps in function  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: BUG #14231: logical replication wal sender process spins when using error traps in function  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-bugs
On Wed, Jul 6, 2016 at 2:26 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
>> So I think this is primarily an artifact of doing so much retail
>> palloc/pfree in a single memory context.
>
> As I recall, this is the main reason Andres stuck the slab cache in
> reorderbuffer.  Maybe it'd be worthwhile to implement a different
> MemoryContext tailored to this use case, and remove the slab cache
> stuff.

I withdraw my remarks on that commit -- I don't think that's what it is now.

I had luck adding a new child memory context for tuplesort.c in commit
0011c0091e886b874e485a46ff2c94222ffbf550. This allowed tuplesort.c to
blow away the free list via a new call to MemoryContextReset(). This
didn't even remove *any* pfree() operations in the affected codepath,
but was still quite effective.

I'm not sure that that's comparable, but it may be an interesting case
that others are not aware of.

--
Peter Geoghegan

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: BUG #14231: logical replication wal sender process spins when using error traps in function
Следующее
От: Andres Freund
Дата:
Сообщение: Re: BUG #14150: Attempted to delete invisible tuple