| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
|---|---|
| To: | Daniil Davydov <3danissimo(at)gmail(dot)com> | 
| Cc: | pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Re: Forbid to DROP temp tables of other sessions | 
| Date: | 2024-10-25 18:01:23 | 
| Message-ID: | 3016487.1729879283@sss.pgh.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Daniil Davydov <3danissimo(at)gmail(dot)com> writes:
> 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"?
If autovacuum can do it, I don't see a reason to prevent superusers
from doing it manually.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Noah Misch | 2024-10-25 18:17:01 | Re: processes stuck in shutdown following OOM/recovery | 
| Previous Message | Tom Lane | 2024-10-25 17:35:00 | Re: Alias of VALUES RTE in explain plan |