Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb2f6f74

Browse files
committed
Fix logical decoding bug leading to inefficient reopening of files.
When spilling transaction data to disk a simple typo caused the outputfile to be closed and reopened for every serialized change. That happensto not have a huge impact on linux, which is why it probably wasn'tnoticed so far, but on windows that appears to trigger actual diskwrites after every change. Not fun.The bug fortunately does not have any impact besides speed. A changecould end up being in the wrong segment (last instead of next), butsince we read all files to the end, that's just ugly, not reallyproblematic. It's not a problem to upgrade, since transaction spillfiles do not persist across restarts.Bug: #13484Reported-By: Olivier GosseaumeDiscussion: 20150703090217.1190.63940@wrigleys.postgresql.orgBackpatch to 9.4, where logical decoding was added.
1 parent5c0de38 commitb2f6f74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/replication/logical/reorderbuffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2009,7 +2009,7 @@ ReorderBufferSerializeTXN(ReorderBuffer *rb, ReorderBufferTXN *txn)
20092009
* store in segment in which it belongs by start lsn, don't split over
20102010
* multiple segments tho
20112011
*/
2012-
if (fd==-1||XLByteInSeg(change->lsn,curOpenSegNo))
2012+
if (fd==-1||!XLByteInSeg(change->lsn,curOpenSegNo))
20132013
{
20142014
XLogRecPtrrecptr;
20152015

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp