Re: BUG #16643: PG13 - Logical replication - initial startup never finishes and gets stuck in startup loop

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Henry Hinze <henry(dot)hinze(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16643: PG13 - Logical replication - initial startup never finishes and gets stuck in startup loop
Date: 2020-10-02 00:08:54
Message-ID: 20201002000854.GA18560@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2020-Oct-01, Peter Eisentraut wrote:

> On 2020-09-30 23:32, Tom Lane wrote:
> > The question that this raises is how the heck did that get past
> > our test suites? It seems like the error should have been obvious
> > to even the most minimal testing.
>
> What's the difference between this case and what the test suite is testing?
> Is it that it replicates between two databases on the same instance?

I don't know why the tests pass, but the message
ERROR: error reading result of streaming command:
does appear in the logs after running src/test/subscription many times
(I see it in tests 001, 002, 013 and 014, apart from the new one in
100). It's indeed surprising that these tests all pass!

I turned Henry's reproducer into the attached TAP test, and it does
reproduce the problem; but if I reduce the number of rows from 5000 to
1000, then it no longer does. I don't quite see why this would be a
problem with a larger table only. Do you?

The fix is the commented-out line in walsender.c; the test reliably
passes for me if I uncomment that, and the error message disappear from
the server logs in all the other tests.

Attachment Content-Type Size
0001-Restore-double-command-completion-tags.patch text/x-diff 2.3 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-10-02 01:19:49 Re: BUG #16643: PG13 - Logical replication - initial startup never finishes and gets stuck in startup loop
Previous Message Dave Cramer 2020-10-01 23:04:49 Re: BUG #16641: Postgresql driver 42.2.15 and 42.2.16 has problems connecting to AWS RDS Postgresql database