Fix logical decoding sendtime update

From: "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Fix logical decoding sendtime update
Date: 2015-06-10 15:57:42
Message-ID: CACACo5THwWLDJSx+vgLSB9Us9XN+K2ihnQLrzSArAgqr21s8Qw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Hackers,

it turns out, that the code in WalSndWriteData is setting the timestamp of
the replication message just *after* it has been sent out to the client,
thus the sendtime field always reads as zero.

Attached is a trivial patch to fix this. The physical replication path
already does the correct thing apparently.

Cheers!
--
Alex

Attachment Content-Type Size
logical-decoding-sendtime-fix.diff text/plain 1.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-06-10 15:58:13 Re: s_lock() seems too aggressive for machines with many sockets
Previous Message Nils Goroll 2015-06-10 15:54:14 Re: s_lock() seems too aggressive for machines with many sockets