ERROR: XX000: variable not found in subplan target list
Ryan Kelly <rpkelly22@gmail.com>
From: Ryan Kelly <rpkelly22@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Date: 2022-02-11T03:21:56Z
Lists: pgsql-bugs
Hello,
After upgrading to 11.15 we have queries failing as follows:
(postgres@[local]:5432 02:52:54) [capitalrx_test_adjudication_master]>
EXPLAIN SELECT count(*) FROM adjudication.claims;
ERROR: XX000: variable not found in subplan target list
LOCATION: fix_upper_expr_mutator, setrefs.c:2427
Time: 0.697 ms
(postgres@[local]:5432 02:53:00) [capitalrx_test_adjudication_master]>
EXPLAIN SELECT count(1) FROM adjudication.claims;
ERROR: XX000: variable not found in subplan target list
LOCATION: fix_upper_expr_mutator, setrefs.c:2427
Time: 0.541 ms
(postgres@[local]:5432 02:53:03) [capitalrx_test_adjudication_master]>
EXPLAIN SELECT count(null) FROM adjudication.claims;
ERROR: XX000: variable not found in subplan target list
LOCATION: fix_upper_expr_mutator, setrefs.c:2427
Time: 0.890 ms
(postgres@[local]:5432 02:53:06) [capitalrx_test_adjudication_master]>
EXPLAIN SELECT count(id) FROM adjudication.claims;
QUERY PLAN
-------------------------------------------------------------------------------------
Aggregate (cost=8.14..8.15 rows=1 width=8)
-> Index Only Scan using claims_pkey on claims (cost=0.12..8.14 rows=1
width=8)
(2 rows)
Time: 1.423 ms
Thanks,
-Ryan Kelly
Commits
-
Don't use_physical_tlist for an IOS with non-returnable columns.
- e5691cc9170b 15.0 landed
- b6f869beeab0 10.21 landed
- 32e801676b1e 12.11 landed
- 277e744ae176 14.3 landed
- 14ee565f399b 11.16 landed
- 0778b24ced8a 13.7 landed