pgsql: Fix logical decoding bug leading to inefficient reopening of fil

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix logical decoding bug leading to inefficient reopening of fil
Date: 2015-07-07 11:14:57
Message-ID: E1ZCQq1-0006NY-9n@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix logical decoding bug leading to inefficient reopening of files.

When spilling transaction data to disk a simple typo caused the output
file to be closed and reopened for every serialized change. That happens
to not have a huge impact on linux, which is why it probably wasn't
noticed so far, but on windows that appears to trigger actual disk
writes after every change. Not fun.

The bug fortunately does not have any impact besides speed. A change
could end up being in the wrong segment (last instead of next), but
since we read all files to the end, that's just ugly, not really
problematic. It's not a problem to upgrade, since transaction spill
files do not persist across restarts.

Bug: #13484
Reported-By: Olivier Gosseaume
Discussion: 20150703090217(dot)1190(dot)63940(at)wrigleys(dot)postgresql(dot)org

Backpatch to 9.4, where logical decoding was added.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/81fc89a5eb006628246029cd49974e158ea153ba

Modified Files
--------------
src/backend/replication/logical/reorderbuffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2015-07-07 11:40:58 pgsql: Add psql PROMPT variable showing the pid of the connected to bac
Previous Message Andres Freund 2015-07-07 11:14:55 pgsql: Fix pg_recvlogical not to fsync output when it's a tty or pipe.