On Wednesday, May 17, 2023 11:05 AM Amit Kapila <amit.kapil...@gmail.com> wrote: > > On Wed, May 17, 2023 at 7:18 AM Zhijie Hou (Fujitsu) <houzj.f...@fujitsu.com> > wrote: > > > > Currently, the main loop of apply worker looks like below[1]. Since > > there are two loops, the inner loop will keep receiving and applying > > message from publisher until no more message left. The worker only > > reloads the configuration in the outer loop. This means if the > > publisher keeps sending messages (it could keep sending multiple > > transactions), the apply worker won't get a chance to update the GUCs. > > > > Apart from that, I think in rare cases, it seems possible that after the apply > worker has waited for the data and just before it receives the new replication > data/message, the reload happens, then it won't get a chance to process the > reload before processing the new message. > I think such a theory can explain the rare BF failure you pointed out later > in the > thread. Does that make sense?
Yes, that makes sense. That's another case where we would miss the reload and I think is the reason for the failure because the apply worker has finished applying changes(which means it's idle) before the failed case. Best Regards, Hou zj