From: Andres Freund <andres@anarazel.de>
To: olivier.gosseaume@free.fr
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #13484: Performance problem with logical decoding
Date: Mon, 6 Jul 2015 23:23:32 +0200
Message-ID: <20150706212332.GG340@alap3.anarazel.de> (raw)
In-Reply-To: <20150706212126.GF340@alap3.anarazel.de>
References: <20150706204138.GC340@alap3.anarazel.de>
<1369864456.17076590.1436216182048.JavaMail.root@zimbra72-e12.priv.proxad.net>
<20150706210527.GE340@alap3.anarazel.de>
<20150706212126.GF340@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 2015-07-06 23:21:26 +0200, Andres Freund wrote:
> On 2015-07-06 23:05:27 +0200, Andres Freund wrote:
> > Ugh, I have a theory. I guess you can't easily recompile postgres with a
> > patch and test again? I don't have access to windows...
>
> So the problem I'm seing is that there's a typo/bug in
> ReorderBufferSerializeTXN(). It closes the filehandle after each
> individual spilled file instead of keeping it open for up to 16MB of
> WAL. On linux that doesn't hurt particularly much, the file isn't
> flushed to disk. Which presumably is why we haven't noticed. But if
> windows does that differently...
Hrmpf, just sent the last part of this message to a different thread.
The fix is just to change
if (fd == -1 || XLByteInSeg(change->lsn, curOpenSegNo))
into
if (fd == -1 || !XLByteInSeg(change->lsn, curOpenSegNo))
the bug doesn't have any correctness implications afaics, just
performance. We read all the spilled files till the end, so even change
spilled to the wrong segment gets picked up.
--
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: andres@anarazel.de, olivier.gosseaume@free.fr
Subject: Re: BUG #13484: Performance problem with logical decoding
In-Reply-To: <20150706212332.GG340@alap3.anarazel.de>
References: <20150706204138.GC340@alap3.anarazel.de> <1369864456.17076590.1436216182048.JavaMail.root@zimbra72-e12.priv.proxad.net> <20150706210527.GE340@alap3.anarazel.de> <20150706212126.GF340@alap3.anarazel.de> <20150706212332.GG340@alap3.anarazel.de>
* 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