Re: Logical replication timeout problem
Fabrice Chapuis <fabrice636861@gmail.com>
From: Fabrice Chapuis <fabrice636861@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Tang, Haiying/唐 海英 <tanghy.fnst@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-01-13T10:13:02Z
Lists: pgsql-hackers
first phase: postgres read WAL files and generate 1420 snap files. second phase: I guess, but on this point maybe you can clarify, postgres has to decode the snap files and remove them if no statement must be applied on a replicated table. It is from this point that the worker process exit after 1 minute timeout. On Wed, Jan 12, 2022 at 11:54 AM Amit Kapila <amit.kapila16@gmail.com> wrote: > On Tue, Jan 11, 2022 at 8:13 PM Fabrice Chapuis <fabrice636861@gmail.com> > wrote: > >> Can you explain why you think this will help in solving your current >> problem? >> >> Indeed your are right this function won't help, we have to look elsewhere. >> >> It is still not clear to me why the problem happened? IIUC, after >> restoring 4096 changes from snap files, we send them to the subscriber, and >> then apply worker should apply those one by one. Now, is it taking one >> minute to restore 4096 changes due to which apply worker is timed out? >> >> Now I can easily reproduce the problem. >> In a first phase, snap files are generated and stored in pg_replslot. >> This process end when1420 files are present in pg_replslots (this is in >> relation with statements that must be replayed from WAL). In the >> pg_stat_replication view, the state field is set to *catchup*. >> In a 2nd phase, the snap files must be decoded. However after one minute >> (wal_receiver_timeout parameter set to 1 minute) the worker process stop >> with a timeout. >> >> > What exactly do you mean by the first and second phase in the above > description? > > -- > With Regards, > Amit Kapila. >
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