Re: Logical replication timeout problem - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Logical replication timeout problem
Date
Msg-id CAA4eK1K0O27c7qbXE5V__LXZHi24jfR+B=JubHx2_a5gfiq+Pg@mail.gmail.com
Whole thread Raw
In response to Logical replication timeout problem  (Fabrice Chapuis <fabrice636861@gmail.com>)
Responses Re: Logical replication timeout problem  (Fabrice Chapuis <fabrice636861@gmail.com>)
List pgsql-hackers
On Wed, Dec 22, 2021 at 8:50 PM Fabrice Chapuis <fabrice636861@gmail.com> wrote:
>
> Hello Amit,
>
> I was able to reproduce the timeout problem in the lab.
> After loading more than 20 millions of rows in a table which is not replicated (insert command ends without error),
errorsrelated to logical replication processes appear in the postgres log.
 
> Approximately every 5 minutes worker process is restarted. The snap files in the slot directory are still present.
Thereplication system seems to be blocked. Why these snap files are not removed. What do they contain?
 
>

These contain changes of insert. I think these are not removed for
your case as your long transaction is never finished. As mentioned
earlier, for such cases, it is better to use 'streaming' feature
released as part of PG-14 but anyway here we are trying to debug
timeout problem.

> I will recompile postgres with your patch to debug.
>

Okay, that might help.

-- 
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Andrey Lepikhov
Date:
Subject: Re: Add index scan progress to pg_stat_progress_vacuum
Next
From: Bharath Rupireddy
Date:
Subject: skip replication slot snapshot/map file removal during end-of-recovery checkpoint