ASO=# SELECT n.nspname AS "Name",
pg_catalog.pg_get_userbyid(n.nspowner) AS "Owner"
FROM pg_catalog.pg_namespace n
ORDER BY 1 LIMIT 15;
Name | Owner
--------------------+----------
information_schema | postgres
pg_catalog | postgres
pg_temp_1 | postgres
pg_temp_10 | postgres
pg_temp_100 | postgres
pg_temp_101 | postgres
pg_temp_102 | postgres
pg_temp_103 | postgres
pg_temp_104 | postgres
pg_temp_11 | postgres
pg_temp_12 | postgres
pg_temp_13 | postgres
pg_temp_14 | postgres
pg_temp_15 | postgres
pg_temp_16 | postgres
(15 rows)
кмк тут два варианта, перезапустить постгрес и "осиротевшие" временные схемы сами удалятся постгресом.
второй вариант аккуратно подробпать схемы pg_temp_ХХ (через drop schema) - но я вам его не советую, т.к. сам не знаю нормального способа выяснить жив ли бэкенд который ассоциирован с конкретной временной схемой. а то так бэкенд может "удивиться", если какая-то соседняя сессия дропнет его схему. хотя там наверно ошибка вылезет.