public inbox for [email protected]
help / color / mirror / Atom feedFrom: Konstantin Knizhnik <[email protected]>
To: Robert Haas <[email protected]>
Cc: Pavel Stehule <[email protected]>
Cc: Tomas Vondra <[email protected]>
Cc: 曾文旌(义从) <[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: Mon, 3 Feb 2020 11:08:10 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+TgmoaNYmuW7oUSeOviXM_8pFfgroDJbY5TXx7j=P7eXhpHqw@mail.gmail.com>
References: <[email protected]>
<CA+TgmobRhPA1gVbMsj9YLA-sv0Ub8NpMrkWCKwRiD=bnjVND3Q@mail.gmail.com>
<[email protected]>
<CAFj8pRAB4Ni+CL6n9QZ24wdp6n_2TLb2hYm60hs_KVXnDzN8tw@mail.gmail.com>
<[email protected]>
<CAFj8pRARb4BiT9Nb-YFg2h+EdbVQt8FY=L0utGM_FL6T-gjc-w@mail.gmail.com>
<[email protected]>
<CAFj8pRAvegZoQCLw3vjHZ=6_Kr7-1UAA5QgGYOshhXU6j_RuCg@mail.gmail.com>
<[email protected]>
<CAFj8pRDVaNQhg1juJKuj3A2fN-TW5LsMVCqyOkEhKKjbjHEk5w@mail.gmail.com>
<[email protected]>
<CA+TgmobN=o7d4zTJywJzsvkCeL4-_3ttWK_dhzpt-P3yCJ=77w@mail.gmail.com>
<[email protected]>
<CA+TgmoZQmLhPdMGM1YA-if2=iYQdSEr9r5b=WWwmJS9FbJNx+Q@mail.gmail.com>
<[email protected]>
<CA+TgmoaNYmuW7oUSeOviXM_8pFfgroDJbY5TXx7j=P7eXhpHqw@mail.gmail.com>
On 31.01.2020 22:38, Robert Haas wrote:
> Now, your idea is not quite as crazy as that, but it has the same
> basic problem: you can't insert code into a low-level facility that
> uses a high level facility which may in turn use and depend on that
> very same low-level facility to not be in the middle of an operation.
> If you do, it's going to break somehow.
>
Thank you for explanation.
You convinced me that building indexes from _bt_getbuf is not good idea.
What do you think about idea to check and build indexes for GTT prior to
query execution?
In this case we do not need to patch code of all indexes - it can be
done just in one place.
We can use build function of access method to initialize index and
populate it with data.
So right now when building query execution plan, optimizer checks if
index is valid.
If index belongs to GTT, it an check that first page of the index is
initialized and if not - call build method for this index.
If building index during building query plan is not desirable, we can
just construct list of indexes which should be checked and
perform check itself and building indexes somewhere after building plan
but for execution of the query.
Do you seem some problems with such approach?
--
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