public inbox for [email protected]
help / color / mirror / Atom feedFrom: Konstantin Knizhnik <[email protected]>
To: Tomas Vondra <[email protected]>
Cc: 曾文旌(义从) <[email protected]>
Cc: Pavel Stehule <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: 蔡松露(子嘉) <[email protected]>
Cc: Cai, Le <[email protected]>
Cc: 萧少聪(铁庵) <[email protected]>
Subject: Re: [Proposal] Global temporary tables
Date: Fri, 10 Jan 2020 11:47:42 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <20200109164829.mdl3z5xalmaqxs67@development>
References: <[email protected]>
<CA+Tgmob_Fg9PfNjjOReJtAE4B5gc8+UqHh+tztJ_C+iRN4KHSw@mail.gmail.com>
<[email protected]>
<CAFj8pRBo8YZ=bJESqf2fkxGL8Bq2Fs7=SjxisS7UhXHh6yPSfA@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<20200105200603.wrb4beacwb57hhpk@development>
<[email protected]>
<[email protected]>
<20200109164829.mdl3z5xalmaqxs67@development>
On 09.01.2020 19:48, Tomas Vondra wrote:
>
>> The most complex and challenged task is to support GTT for all kind
>> of indexes. Unfortunately I can not proposed some good universal
>> solution for it.
>> Just patching all existed indexes implementation seems to be the only
>> choice.
>>
>
> I haven't looked at the indexing issue closely, but IMO we need to
> ensure that every session sees/uses only indexes on GTT that were
> defined before the seesion started using the table.
Why? It contradicts with behavior of normal tables.
Assume that you have active clients and at some point of time DBA
recognizes that them are spending to much time in scanning some GTT.
It cab create index for this GTT but if existed client will not be able
to use this index, then we need somehow make this clients to restart
their sessions?
In my patch I have implemented building indexes for GTT on demand: if
accessed index on GTT is not yet initialized, then it is filled with
local data.
>
> Can't we track which indexes a particular session sees, somehow?
>
>> Statistic is another important case.
>> But once again I do not completely understand why we want to address
>> all this issues with statistic in first version of the patch?
>
> I think the question is which "issues with statistic" you mean. I'm sure
> we can ignore some of them, e.g. the one with parallel workers not
> having any stats (assuming we consider functions using GTT to be
> parallel restricted).
If we do not use shared buffers for GTT then parallel processing of GTT
is not possible at all, so there is no problem with statistic for
parallel workers.
>
> I think someone pointed out pushing stuff directly into the cache is
> rather problematic, but I don't recall the details.
>
I have not encountered any problems, so if you can point me on what is
wrong with this approach, I will think about alternative solution.
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
view thread (492+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: [Proposal] Global temporary tables
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox