Re: removal of dangling temp tables

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
Re: removal of dangling temp tables
Дата
Msg-id
20181215132116.5v25mjgyy7y77pzw@alvherre.pgsql
Ответ на
Список
Дерево обсуждения
removal of dangling temp tables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: removal of dangling temp tables Robert Haas <robertmhaas@gmail.com>
Re: removal of dangling temp tables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: removal of dangling temp tables Robert Haas <robertmhaas@gmail.com>
Re: removal of dangling temp tables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: removal of dangling temp tables Tom Lane <tgl@sss.pgh.pa.us>
Re: removal of dangling temp tables Robert Haas <robertmhaas@gmail.com>
Re: removal of dangling temp tables Tom Lane <tgl@sss.pgh.pa.us>
Re: removal of dangling temp tables Andres Freund <andres@anarazel.de>
Re: removal of dangling temp tables Robert Haas <robertmhaas@gmail.com>
Re: removal of dangling temp tables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: removal of dangling temp tables Michael Paquier <michael@paquier.xyz>
Re: removal of dangling temp tables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: removal of dangling temp tables Tom Lane <tgl@sss.pgh.pa.us>
Re: removal of dangling temp tables Michael Paquier <michael@paquier.xyz>
Re: removal of dangling temp tables Alvaro Herrera <alvherre@2ndquadrant.com>
RE: removal of dangling temp tables "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: removal of dangling temp tables Alvaro Herrera <alvherre@2ndquadrant.com>
RE: removal of dangling temp tables "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: removal of dangling temp tables Michael Paquier <michael@paquier.xyz>
Re: removal of dangling temp tables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: removal of dangling temp tables Michael Paquier <michael@paquier.xyz>
Re: removal of dangling temp tables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: removal of dangling temp tables Michael Paquier <michael@paquier.xyz>
Re: removal of dangling temp tables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: removal of dangling temp tables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: removal of dangling temp tables Tom Lane <tgl@sss.pgh.pa.us>
Re: removal of dangling temp tables Tom Lane <tgl@sss.pgh.pa.us>
Re: removal of dangling temp tables Alvaro Herrera <alvherre@2ndquadrant.com>
On 2018-Dec-15, Michael Paquier wrote:

> On Fri, Dec 14, 2018 at 11:06:32PM -0300, Alvaro Herrera wrote:
> > I did propose in my OP the idea of a PGPROC boolean flag that indicates
> > whether the temp namespace has been set up.  If not, have autovac remove
> > those tables.  I like this option better, but I fear it adds more
> > ProcArrayLock contention.  Maybe I can just use a new LWLock to
> > coordinate that particular member of the ProcGlobal array ... (but then
> > it can no longer be a boolean.)
> 
> Isn't that what tempNamespaceId can be used for in PGPROC now?  The flag
> would be set only when a backend creates a new temporary schema so as it
> can be tracked as the owner of the schema.

Oh, we already have it!  Sorry, I overlooked it.  With that, it seems
the patch is fairly simple ... I wonder about the locking implications
in autovacuum, though -- the value is set in backends without acquiring
a lock.  I wonder if we could use memory barriers, so it'd incur little
cost.

I wonder how this thing works in parallel query workers.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

В списке pgsql-hackers по дате отправления
От: Sergei Kornilov
Дата:
От: Petr Jelinek
Дата:
FAQ