Re: [Proposal] Global temporary tables - Mailing list pgsql-hackers

From Konstantin Knizhnik
Subject Re: [Proposal] Global temporary tables
Date
Msg-id 2e7fc7af-34f7-f707-5100-2c3d24128aee@postgrespro.ru
Whole thread Raw
In response to Re: [Proposal] Global temporary tables  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: [Proposal] Global temporary tables  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers


On 29.01.2020 20:08, Pavel Stehule wrote:



2. Actually I do not propose some completely new approach. I try to
provide behavior with is compatible with regular tables.
If you create index for regular table, then it can be used in all
sessions, right?

I don't understand to this point. Regular tables shares data, shares files. You cannot to separate it. More - you have to uses relatively aggressive locks to be this operation safe.

Nothing from these points are valid for GTT.

GTT shares metadata.
As far as them are not sharing data, then GTT are safer than regular table, aren't them?
"Safer" means that we need less "aggressive" locks for them: we need to protect only metadata, not data itself.

My point is that if we allow other sessions to access created indexes for regular tables, then it will be not more complex to support it for GTT.
Actually "not more complex" in this case means "no extra efforts are needed".

-- 
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company 

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: [Proposal] Global temporary tables
Next
From: Pavel Stehule
Date:
Subject: Re: [Proposal] Global temporary tables