Hi,
I understand the point that’s been raised. Would it be an option to indeed revert the portal drop in postgres.c, but then append the right query in the "temporary file: ..." log line instead? This would work at least for me.
Attached is a POC patch (contains a layering violation, hoping it could be avoided somehow).
Kind regards,
Mircea Cadariu