And how would it interact with some "fully persistent/shared" variables?
I have not any use case for this. I don't know about any similar feature in other database systems. Oracle uses dbms_pipe or dbms_alert for interprocess communication.
I am thinking so it is possible to implement. If it is not ACID, then it can work as custom statistic counters. If it should be ACID? Then is better to use table. What I know, now is preferred share nothing design in parallel systems - so for me, it looks like little bit dangerous feature - and I see only one use case - custom statistics - where possible race condition is not hard issue.
But I don't plan to implement it in first stage. There should be strong use case for implementing any complex feature in shared memory. But any implementation doesn't breaking to implement it in feature.
for custom statistic some extension based on bg worker can be better - sharing variables are risk of race conditions - and developers are people only.
I have not a clean opinion about this - the implementation should not be hard, but I am not sure if this gun I would to give to users.