Hi, On 2023-02-07 16:56:55 -0500, Robert Haas wrote: > On Wed, Feb 1, 2023 at 4:02 PM Andres Freund <and...@anarazel.de> wrote: > > > + /* Is the use of a password mandatory? */ > > > + must_use_password = MySubscription->passwordrequired && > > > + !superuser_arg(MySubscription->owner); > > > > There's a few repetitions of this - perhaps worth putting into a helper? > > I don't think so. It's slightly different each time, because it's > pulling data out of different data structures. > > > This still leaks the connection on error, no? > > I've attempted to fix this in v4, attached.
Hm - it still feels wrong that we error out in case of failure, despite the comment to the function saying: * Returns NULL on error and fills the err with palloc'ed error message. Other than this, the change looks ready to me. Greetings, Andres Freund