On Sun, Feb 18, 2024 at 7:40 PM Zhijie Hou (Fujitsu) <houzj.f...@fujitsu.com> wrote: > > On Friday, February 16, 2024 6:41 PM shveta malik <shveta.ma...@gmail.com> > wrote: > Thanks for the patch. Here are few comments:
Thanks for the comments. > > 2. > > +static bool > +validate_remote_info(WalReceiverConn *wrconn, int elevel) > ... > + > + return (!remote_in_recovery && primary_slot_valid); > > The primary_slot_valid could be uninitialized in this function. return (!remote_in_recovery && primary_slot_valid); Here if remote_in_recovery is true, it will not even read primary_slot_valid. It will read primary_slot_valid only if remote_in_recovery is false and in such a case primary_slot_valid will always be initialized in the else block above, let me know if you still feel we shall initialize this to some default? thanks Shveta