Re: [PROPOSAL] Drop orphan temp tables in single-mode - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PROPOSAL] Drop orphan temp tables in single-mode
Date
Msg-id 13209.1551972251@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PROPOSAL] Drop orphan temp tables in single-mode  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [PROPOSAL] Drop orphan temp tables in single-mode
List pgsql-hackers
Robert Haas <robertmhaas@gmail.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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] Block level parallel vacuum
Next
From: tushar
Date:
Subject: Re: Minimal logical decoding on standbys