Hi Noah,
> > Would you like to propose a patch?
>
> Sure. I will work on creating a document patch.
I reconfirmed the conditions under which this issue occurred.
Since this happens when the current connection is disconnected by another thread in a multiple threaded application,
I added an information about "the current connection in a multiple threaded application" to explain the limitations.
I attached the patch to this mail.
I reported a version of PostgreSQL 12, but this patch is based on the master branch.
Regards,
Yusuke Egashira