I wrote:
> Speculating wildly, I'm wondering about an uninitialized variable that
> happens to usually have the right value.

Nope: valgrind finds nothing, and neither does debug_discard_caches.
What does reproduce it, with seeming 100% reliability, is

set jit = 1;
set jit_above_cost = 0;
set jit_optimize_above_cost = 1000;
CREATE TABLE gtest21c (a int NOT NULL, b int GENERATED ALWAYS AS (a * 2) 
VIRTUAL NOT NULL, c int NOT NULL);
INSERT INTO gtest21c (a, c) VALUES (10, 42);
table gtest21c;

I conclude that something in the JIT code for tuple formation
is unaware of virtual generated columns.

                        regards, tom lane


Reply via email to