Sudden database error with COUNT(*) making Query Planner crashes: variable not found in subplan target list

2022-06-06 Thread Jean Landercy - BEEODIVERSITY
Dear PostgreSQL Hacker Community, I am facing a tricky bug which makes the Query Planner crashes when using COUNT(*) function. Without any upgrade suddenly a table of a database instance could not be queried this way: SELECT COUNT(*) FROM items; -- ERROR: variable not found in subplan target

RE: Sudden database error with COUNT(*) making Query Planner crashes: variable not found in subplan target list

2022-06-06 Thread Jean Landercy - BEEODIVERSITY
Dear Justin, Thank you for your quick reply. Unfortunately, the server having this issue is an Azure Flexible Server. Upgrades are managed by Azure, I will have to wait until they release the version 13.7. Is there a procedure to replicate the database and preserve the bug. My attempts with pg_d

RE: Sudden database error with COUNT(*) making Query Planner crashes: variable not found in subplan target list

2022-06-07 Thread Jean Landercy - BEEODIVERSITY
Dear David, Thank you for taking time on this issue. Here is the detail of the table (I have anonymized it on SO, this is its real name): \d logistic_site Table « public.logistic_site » Colonne | Type | Collationnement | NULL-ab