Re: BUG #13484: Performance problem with logical decoding

From: olivier(dot)gosseaume(at)free(dot)fr
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13484: Performance problem with logical decoding
Date: 2015-07-06 21:48:33
Message-ID: 1803533379.17196016.1436219313665.JavaMail.root@zimbra72-e12.priv.proxad.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


>> 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.

Great. I will try to rebuild on Windows with this patch and let you know

Olivier

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Marko Tiikkaja 2015-07-06 21:56:27 Re: BUG #13484: Performance problem with logical decoding
Previous Message olivier.gosseaume 2015-07-06 21:44:54 Re: BUG #13484: Performance problem with logical decoding