From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: blake@rcmail.com, pgsql-bugs@postgresql.org, Andres Freund <andres@anazarel.de>
Subject: Re: BUG #14231: logical replication wal sender process spins when using error traps in function
Date: Wed, 6 Jul 2016 17:26:00 -0400
Message-ID: <20160706212600.GA649263@alvherre.pgsql> (raw)
In-Reply-To: <878txea5b4.fsf@news-spur.riddles.org.uk>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: alvherre@2ndquadrant.com, andrew@tao11.riddles.org.uk, andres@anazarel.de
Subject: Re: BUG #14231: logical replication wal sender process spins when using error traps in function
In-Reply-To: <20160706212600.GA649263@alvherre.pgsql>
References: <878txea5b4.fsf@news-spur.riddles.org.uk> <20160706212600.GA649263@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox