Forbid to DROP temp tables of other sessions

From: Daniil Davydov <3danissimo(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Forbid to DROP temp tables of other sessions
Date: 2024-10-25 08:02:37
Message-ID: CAJDiXgj72Axj0d4ojKdRWG_rnkfs4uWY414NL=15sCvh7-9rwg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
I noticed that TRUNCATE and ALTER commands on temporary tables of other
sessions produce an error "cannot truncate/alter temporary tables of other
sessions". But are there any reasons to allow us to DROP such tables?
It seems to me that the only case when we may need it is the removal of
orphan tables. But the autovacuum is responsible for this and it uses a
different functionality. I'm wondering if there are any other cases. If
not, can we just handle it for example in ExecDropStmt and produce an error
like "cannot drop temporary tables of other sessions"?

--
Best regards,
Daniil Davydov

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrei Lepikhov 2024-10-25 08:07:19 Re: cache lookup failed when \d t concurrent with DML change column data type
Previous Message James Pang 2024-10-25 07:59:26 Re: proposal: schema variables