Re: Schema variables - new implementation for Postgres 15

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, dean(dot)a(dot)rasheed(at)gmail(dot)com, er(at)xs4all(dot)nl, joel(at)compiler(dot)org, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Schema variables - new implementation for Postgres 15
Date: 2022-11-04 14:07:48
Message-ID: 20221104140748.3m36g3bkatmckzua@ddolgov.remote.csb
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Christensen 2022-11-04 14:16:29 Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL
Previous Message Jehan-Guillaume de Rorthais 2022-11-04 14:06:29 Re: Fix proposal for comparaison bugs in PostgreSQL::Version