Re: Fastpath while arranging the changes in LSN order in logical decoding

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: David Zhang <david(dot)zhang(at)highgo(dot)ca>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fastpath while arranging the changes in LSN order in logical decoding
Date: 2020-03-03 05:11:27
Message-ID: CAFiTN-siioyZwW+oy0rxbyFC1mFvyqcKe2PKWrb4BFU3RdUkLw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 19, 2020 at 6:00 AM David Zhang <david(dot)zhang(at)highgo(dot)ca> wrote:
>
> After manually applied the patch, a diff regenerated is attached.
>
> On 2020-02-18 4:16 p.m., David Zhang wrote:
> > 1. Tried to apply the patch to PG 12.2 commit 45b88269a353ad93744772791feb6d01bc7e1e42 (HEAD -> REL_12_2, tag: REL_12_2), it doesn't work. Then tried to check the patch, and found the errors showing below.
> > $ git apply --check 0001-Fastpath-for-sending-changes-to-output-plugin-in-log.patch
> > error: patch failed: contrib/test_decoding/logical.conf:1
> > error: contrib/test_decoding/logical.conf: patch does not apply
> > error: patch failed: src/backend/replication/logical/reorderbuffer.c:1133
> > error: src/backend/replication/logical/reorderbuffer.c: patch does not apply
> >
> > 2. Ran a further check for file "logical.conf", and found there is only one commit since 2014, which doesn't have the parameter, "logical_decoding_work_mem = 64kB"
> >
> > 3. Manually apply the patch including src/backend/replication/logical/reorderbuffer.c, and then ran a simple logical replication test. A connection issue is found like below,
> > "table public.pgbench_accounts: INSERT: aid[integer]:4071 bid[integer]:1 abalance[integer]:0 filler[character]:' '
> > pg_recvlogical: error: could not receive data from WAL stream: server closed the connection unexpectedly
> > This probably means the server terminated abnormally
> > before or while processing the request.
> > pg_recvlogical: disconnected; waiting 5 seconds to try again"
> >
> > 4. This connection issue can be reproduced on PG 12.2 commit mentioned above, the basic steps,
> > 4.1 Change "wal_level = logical" in "postgresql.conf"
> > 4.2 create a logical slot and listen on it,
> > $ pg_recvlogical -d postgres --slot test --create-slot
> > $ pg_recvlogical -d postgres --slot test --start -f -
> >
> > 4.3 from another terminal, run the command below,
> > $ pgbench -i -p 5432 -d postgres
> >
> > Let me know if I did something wrong, and if a new patch is available, I can re-run the test on the same environment.

Thanks for testing and rebasing. I think one of the hunks is missing
in your rebased version. That could be the reason for failure. Can
you test on my latest version?

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-03-03 05:31:01 Re: color by default
Previous Message Dilip Kumar 2020-03-03 05:11:11 Re: Fastpath while arranging the changes in LSN order in logical decoding