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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #14231: logical replication wal sender process spins when using error traps in function
Дата
Msg-id 20160706212600.GA649263@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: BUG #14231: logical replication wal sender process spins when using error traps in function  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Ответы Re: BUG #14231: logical replication wal sender process spins when using error traps in function  (andres@anarazel.de (Andres Freund))
Re: BUG #14231: logical replication wal sender process spins when using error traps in function  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-bugs
Andrew Gierth wrote:

> A quick scan of the code suggests that the worst case is when blocks are
> being freed in FIFO order, which seems quite plausible in this case, and
> the performance is potentially O(N^2).
>
> 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.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: BUG #14231: logical replication wal sender process spins when using error traps in function
Следующее
От: andres@anarazel.de (Andres Freund)
Дата:
Сообщение: Re: BUG #14231: logical replication wal sender process spins when using error traps in function