Re: Schema variables - new implementation for Postgres 15

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Schema variables - new implementation for Postgres 15
Дата
Msg-id CAFj8pRBNWSVsJyF2=p9gjOOzn-9pg0dgNUYgswTuK9673V7=rw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Schema variables - new implementation for Postgres 15  (Dmitry Dolgov <9erthalion6@gmail.com>)
Ответы Re: Schema variables - new implementation for Postgres 15  (Dmitry Dolgov <9erthalion6@gmail.com>)
Список pgsql-hackers
Hi


pá 4. 11. 2022 v 15:08 odesílatel Dmitry Dolgov <9erthalion6@gmail.com> napsal:
> On Fri, Nov 04, 2022 at 05:58:06AM +0100, Pavel Stehule wrote:
> Hi
>
> fix clang warning

I've stumbled upon something that looks weird to me (inspired by the
example from tests):

    =# create variable v2 as int;
    =# let v2 = 3;
    =# create view vv2 as select coalesce(v2, 0) + 1000 as result

    =# select * from vv2;
     result
     --------
        1003

    =# set force_parallel_mode to on;
    =# select * from vv2;
     result
     --------
        1000

In the second select the actual work is done from a worker backend.
Since values of session variables are stored in the backend local
memory, it's not being shared with the worker and the value is not found
in the hash map. Does this suppose to be like that?

It looks like a bug, but parallel queries should be supported.

The value of the variable is passed as parameter to the worker backend. But probably somewhere the original reference was not replaced by parameter
 

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

Предыдущее
От: Antonin Houska
Дата:
Сообщение: Re: WIP: Aggregation push-down - take2
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: Re: Schema variables - new implementation for Postgres 15