RE: Logical replication timeout problem
Wei Wang (Fujitsu) <wangw.fnst@fujitsu.com>
From: "wangw.fnst@fujitsu.com" <wangw.fnst@fujitsu.com>
To: "shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>, Amit Kapila <amit.kapila16@gmail.com>, "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>
Cc: Peter Smith <smithpb2250@gmail.com>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, Fabrice Chapuis <fabrice636861@gmail.com>, Euler Taveira <euler@eulerto.com>, Masahiko Sawada <sawada.mshk@gmail.com>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, Simon Riggs <simon.riggs@enterprisedb.com>, Petr Jelinek <petr.jelinek@enterprisedb.com>, "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Ajin Cherian <itsajin@gmail.com>
Date: 2023-01-30T05:06:48Z
Lists: pgsql-hackers
Attachments
- v9-0001-Fix-the-logical-replication-timeout-during-proces.patch (application/octet-stream) patch v9-0001
On Mon, Jan 30, 2023 11:37 AM Shi, Yu/侍 雨 <shiy.fnst@cn.fujitsu.com> wrote: > On Sun, Jan 29, 2023 3:41 PM wangw.fnst@fujitsu.com > <wangw.fnst@fujitsu.com> wrote: > > > > I tested a mix transaction of transactional and non-transactional messages on > > the current HEAD and reproduced the timeout problem. I think this result is > OK. > > Because when decoding a transaction, non-transactional changes are > processed > > directly and the function WalSndKeepaliveIfNecessary is called, while > > transactional changes are cached and processed after decoding. After > decoding, > > only transactional changes will be processed (in the function > > ReorderBufferProcessTXN), so the timeout problem will still be reproduced. > > > > After applying the v8 patch, the test mentioned above didn't reproduce the > > timeout problem (Attach this test script 'test_with_nontransactional.sh'). > > > > Attach the new patch. > > > > Thanks for updating the patch. Here is a comment. Thanks for your comment. > In update_progress_txn_cb_wrapper(), it looks like we need to reset > changes_count to 0 after calling OutputPluginUpdateProgress(), otherwise > OutputPluginUpdateProgress() will always be called after 100 changes. Yes, I think you are right. Fixed this problem. Attach the new patch. Regards, Wang Wei
Commits
-
Fix the logical replication timeout during large DDLs.
- 8c58624df462 16.0 landed
-
Fix the logical replication timeout during large transactions.
- f95d53eded55 15.0 landed
- d6da71fa8f28 14.4 landed
- 55558df23741 13.8 landed
- f832b5007c1c 12.12 landed
- 87c1dd246af8 11.17 landed
- a4015ec0375d 10.22 landed
-
Rethink the delay-checkpoint-end mechanism in the back-branches.
- 10520f434687 14.3 cited
-
Revert "Logical decoding of sequences"
- 2c7ea57e56ca 15.0 cited
-
Skip empty transactions for logical replication.
- d5a9d86d8ffc 15.0 cited
-
Allow specifying column lists for logical replication
- 923def9a533a 15.0 cited
-
Add decoding of sequences to built-in replication
- 75b1521dae1f 15.0 cited
-
Fix ABI break introduced by commit 4daa140a2f.
- 56e366f6757d 13.4 cited
-
Lag tracking for logical replication
- 024711bb5446 10.0 cited