On 2022-Oct-14, Bharath Rupireddy wrote: > On Fri, Oct 14, 2022 at 1:54 PM Alvaro Herrera <alvhe...@alvh.no-ip.org> > wrote: > > But alternatively, we could just remove emit_warning as a flag and have > > the warning be emitted always; then we can use the boolean for the other > > purpose. I don't think the extra WARNING thrown during backup set-up is > > going to be a problem, since it will mostly never be seen anyway (and if > > you do see it, it's not a lie.) > > +1 for this.
OK, pushed 0001, but I modified it some more, because the flag is not really a "quick exit" optimization but actually critical for correctness; so I reworked the function to have an if block around it rather than an early return, and I added an assert about the flag and session backup state. CI was green for it and on manual testing it seems to work correctly. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "No es bueno caminar con un hombre muerto"