ERROR: XX000: variable not found in subplan target list - Mailing list pgsql-bugs

From Ryan Kelly
Subject ERROR: XX000: variable not found in subplan target list
Date
Msg-id CAHUie24ddN+pDNw7fkhNrjrwAX=fXXfGZZEHhRuofV_N_ftaSg@mail.gmail.com
Whole thread Raw
Responses Re: ERROR: XX000: variable not found in subplan target list  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: BUG #17401: REINDEX TABLE CONCURRENTLY creates a race condition on a streaming replica
Next
From: Tom Lane
Date:
Subject: Re: ERROR: XX000: variable not found in subplan target list