Is temporary functions feature official/supported? Found some issues with it.

Alexey Bashtanov <bashtanov@imap.cc>

From: Alexey Bashtanov <bashtanov@imap.cc>
To: pgsql-bugs@postgresql.org
Cc: mmitar@gmail.com
Date: 2019-01-02T17:33:12Z
Lists: pgsql-bugs
Hello,

Is creating functions in pg_temp schema something we support?
It's undocumented as far as I could see, but maybe I missed it.
People seem to use it.

I found that a combination of temporary functions and prepared 
transactions can lead to:
1) all other sessions being unable to create a temporary table until the 
prepared transaction is finished (reproducible);
2) data corruption in pg_namespace, server crash (happened a few times, 
but I'm not yet sure how to reproduce).

Is it something worth reporting in more detail?

Best,
   Alex


Commits

  1. Restrict the use of temporary namespace in two-phase transactions