Logical decoding error

From: Mark Fletcher <markf(at)corp(dot)groups(dot)io>
To: pgsql-general(at)postgresql(dot)org
Subject: Logical decoding error
Date: 2017-11-02 16:34:18
Message-ID: CAEO096qhio06Cdrx-WuAAwvHZiSzY4hzLSb+SrjL4vNpXwJkQg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

Running Postgres 9.6.5, we're using logical decoding to take changes to the
database and propagate them elsewhere in our system. We are using the PGX
Go Postgres library, at https://github.com/jackc/pgx, and we are using the
test_decoding plugin to format the changes. We are using 6 slots/have 6
processes streaming the changes from our database.

This setup works great, except that every 20 hours or so, some or all of
the processes encounter a problem, all at the same time. They receive an
unexpected message type 'w'. At this point the processes restart, and when
they do, they encounter another error: "ERROR: got sequence entry 0 for
toast chunk 20559160 instead of seq 6935 (SQLSTATE XX000)" (the chunk
number/seq number varies). This causes them to restart again. They will
encounter the sequence entry error up to 3 more times, before things
magically start to work again.

We are also doing standard streaming replication to a slave off this
database, and that has never seen a problem.

Does this ring a bell for anyone? Do you have any suggestions for how I
should go about figuring out what's happening?

Thanks,
Mark

Responses

Browse pgsql-general by date

  From Date Subject
Next Message nmmulla 2017-11-02 16:38:25 Hot Standby syntax error
Previous Message Tom Lane 2017-11-02 15:40:14 Re: Building tds_fdw Extension for Windows 64bit