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

From Michael Paquier
Subject Re: [PROPOSAL] Drop orphan temp tables in single-mode
Date
Msg-id 20190308062745.GI4099@paquier.xyz
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
On Thu, Mar 07, 2019 at 10:49:29AM -0500, Robert Haas wrote:
> On Thu, Mar 7, 2019 at 10:24 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > 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 am on the fence about that.  I see your point, but on the other
> hand, autovacuum drops temp tables all the time in multi-user mode and
> I think it's pretty clear that, with the possible exception of you,
> users find that an improvement.  So it could be argued that we're
> merely proposing to make the single-user mode behavior of vacuum
> consistent with the behavior people are already expecting it to do.

It is possible for a session to drop temporary tables of other
sessions.  Wouldn't it work as well in this case for single-user mode
when seeing an orphan temp table still defined?  Like Tom, I don't
think that it is a good idea to play with the heuristics of VACUUM in
the way the patch proposes.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: speeding up planning with partitions
Next
From: Pavel Stehule
Date:
Subject: Re: PostgreSQL vs SQL/XML Standards