Re: [PROPOSAL] Drop orphan temp tables in single-mode

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>, 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 15:24:11
Message-ID: 13209.1551972251@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> In a way I agree, but I think the reality is that some very large
> percentage of people who enter single user mode do so because of a
> wraparound-induced shutdown, and what they need is an easy way to get
> the system back on line. Running a catalog query to look for
> undropped temp tables and then dropping them one by one using DROP
> TABLE is not what they want. They want to be able to run one or two
> commands and get their database back on line.

So if we think we can invent a "MAGICALLY FIX MY DATABASE" command,
let's do that. But please let's not turn a well defined command
like VACUUM into something that you don't quite know what it will do.
I'm especially down on having squishy DWIM logic in a last-resort
operating mode; the fact that some people only use it in a certain way
is a poor excuse for setting booby traps for everybody.

Something I could get behind as a less dangerous way of addressing
this issue is to define DISCARD TEMP, in single-user mode, as dropping
the contents of all temp schemas not just one.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message tushar 2019-03-07 15:33:51 Re: Minimal logical decoding on standbys
Previous Message Robert Haas 2019-03-07 15:21:51 Re: [HACKERS] Block level parallel vacuum