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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-08 06:27:45
Message-ID: 20190308062745.GI4099@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2019-03-08 06:41:04 Re: PostgreSQL vs SQL/XML Standards
Previous Message Amit Langote 2019-03-08 06:26:55 Re: speeding up planning with partitions