I tested this with a patched version of the EDB PG 17 installer that includes this patch and it fixed the issue I was having described in:
https://www.postgresql.org/message-id/000001db1df8%2449765bb0%24dc631310%24%40pcorp.us
It would be great if this was backported to PG17.
The new status of this patch is: Needs review