Re: BackendKeyData is mandatory? - Mailing list pgsql-hackers

From Jelte Fennema-Nio
Subject Re: BackendKeyData is mandatory?
Date
Msg-id CAGECzQT=xNV-V+vFC7YQwYQMj0wGN61b3p=J1_rL6M0vbjTtrA@mail.gmail.com
Whole thread Raw
In response to Re: BackendKeyData is mandatory?  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: BackendKeyData is mandatory?
List pgsql-hackers
On Thu, 14 Aug 2025 at 15:10, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> Here's a new set of patches, to disconnect on OOM instead of hanging or
> silently discarding messages:

Code looks good. Som small nitpicks though.

This change seems unnecessary, i.e. free(NULL) is a no-op

-        free(svname);
+        if (svname)
+            free(svname);


Small wording suggestion, maybe change this:

The caller has already saved the error message in conn->errorMessage.

to

The caller should have already saved the error message in conn->errorMessage.

or even

The caller should have already saved the error message using
libpq_append_conn_error.



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: A few patches to clarify snapshot management
Next
From: Sami Imseih
Date:
Subject: Re: Improve LWLock tranche name visibility across backends