Re: Logical decoding error

From: Mark Fletcher <markf(at)corp(dot)groups(dot)io>
To: Steve Atkins <steve(at)blighty(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Logical decoding error
Date: 2017-11-02 18:03:11
Message-ID: CAEO096rrDwuZg4UOPvc7tPtBZPraUgPc8RJ5y7px+d-r9Q85CQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Nov 2, 2017 at 9:59 AM, Steve Atkins <steve(at)blighty(dot)com> wrote:

>
> Where are the errors coming from - your code or pgx? If it's from pgx,
> what's the exact error? ('w' is regular replication payload data, so it'd
> be expected as a copydata payload message type, but would be an error for a
> replication message).
>
> The errors are coming from PGX. Best I can tell (and I'm not very familiar
with the PGX code, nor with the internals of Postgres replication), it's
waiting for a replication message from the backend, so it's expecting
things like CopyData/CopyInResponse/CopyOutResponse/CopyBothResponse. It
gets a 'w' msg type there, which it doesn't handle, so it errors back to me
(the copydata message type it expects there is 'd').

I'm only using PGX to open a replication connection, start replication,
read replication messages and send heartbeats.

I did open an issue on GitHub about this a couple of days ago, but haven't
heard back from the PGX developer, so I thought I should try to help out
and debug it myself. So I've been trying to educate myself on replication
internals and such. Hence my email here.

Do you capture the raw data from the replication connection when the error
> happens?
>
> I was not, but I have added that and some other logging, and will report
back when I get more info.

Thanks,
Mark

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-11-02 19:18:37 Re: Building tds_fdw Extension for Windows 64bit
Previous Message Igal @ Lucee.org 2017-11-02 18:00:25 Re: Building tds_fdw Extension for Windows 64bit