Re: [Proposal] Global temporary tables

Поиск
Список
Период
Сортировка
От 曾文旌(义从)
Тема Re: [Proposal] Global temporary tables
Дата
Msg-id FE206F1E-0F94-4E60-9A1D-D52B1421F16B@alibaba-inc.com
обсуждение исходный текст
Ответ на Re: [Proposal] Global temporary tables  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: [Proposal] Global temporary tables  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers


2020年1月30日 下午10:21,Pavel Stehule <pavel.stehule@gmail.com> 写道:



čt 30. 1. 2020 v 15:17 odesílatel 曾文旌(义从) <wenjing.zwj@alibaba-inc.com> napsal:


> 2020年1月29日 下午9:48,Robert Haas <robertmhaas@gmail.com> 写道:
>
> On Tue, Jan 28, 2020 at 12:12 PM 曾文旌(义从) <wenjing.zwj@alibaba-inc.com> wrote:
>>> Opinion by Pavel
>>> + rel->rd_islocaltemp = true;  <<<<<<< if this is valid, then the name of field "rd_islocaltemp" is not probably best
>>> I renamed rd_islocaltemp
>>
>> I don't see any change?
>>
>> Rename rd_islocaltemp to rd_istemp  in global_temporary_table_v8-pg13.patch
>
> In view of commit 6919b7e3294702adc39effd16634b2715d04f012, I think
> that this has approximately a 0% chance of being acceptable. If you're
> setting a field in a way that is inconsistent with the current use of
> the field, you're probably doing it wrong, because the field has an
> existing purpose to which new code must conform. And if you're not
> doing that, then you don't need to rename it.
Thank you for pointing it out.
I've rolled back the rename.
But I still need rd_localtemp to be true, The reason is that
1 GTT The GTT needs to support DML in read-only transactions ,like local temp table.
2 GTT does not need to hold the lock before modifying the index buffer ,also like local temp table.

Please give me feedback.

maybe some like

rel->rd_globaltemp = true;

and somewhere else

if (rel->rd_localtemp || rel->rd_globaltemp)
{
  ...
}
I tried to optimize code in global_temporary_table_v10-pg13.patch


Please give me feedback.

Wenjing






Wenjing




>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company


Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: psql - add SHOW_ALL_RESULTS option
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: PATCH: add support for IN and @> in functional-dependencystatistics use