From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru> |
Cc: | Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Grigory Smolkin <g(dot)smolkin(at)postgrespro(dot)ru> |
Subject: | Re: [PROPOSAL] Drop orphan temp tables in single-mode |
Date: | 2019-03-07 14:39:48 |
Message-ID: | 8593.1551969588@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru> writes:
> In some cases if PostgreSQL encounters with wraparound PostgreSQL might
> leave created temporary tables even after shutdown.
> This orphan temporary tables prevent VACUUM to fix wraparound. It is
> because in single mode VACUUM considers orphan temp tables as temp
> tables of other backends.
Hm.
> This patch fixes the issue. With it VACUUM deletes orphaned tables in
> single mode.
This seems like an astonishingly bad idea. Nobody would expect DROP TABLE
to be spelled "VACUUM", and the last thing we need when someone has been
forced to use single-user mode is to put additional land mines under their
feet. They might, for example, wish to do forensic investigation on such
tables to discover the reason for a crash.
I wonder if a better response would be, in single-user mode, to allow temp
tables to be processed as local temp tables regardless of their backend
number. (Everywhere, not just in VACUUM.)
Also, if what someone actually wants is to drop such a temp table from
single-user mode, we should make sure that they are allowed to do so.
But the command for doing that should be "DROP TABLE", not "VACUUM".
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2019-03-07 14:49:32 | Re: Protect syscache from bloating with negative cache entries |
Previous Message | Robert Haas | 2019-03-07 14:34:24 | Re: Protect syscache from bloating with negative cache entries |