BUG #18170: Unexpected error: no relation entry for relid 3

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: zuming(dot)jiang(at)inf(dot)ethz(dot)ch
Subject: BUG #18170: Unexpected error: no relation entry for relid 3
Date: 2023-10-26 14:01:11
Message-ID: 18170-f1d17bf9a0d58b24@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 18170
Logged by: Zuming Jiang
Email address: zuming(dot)jiang(at)inf(dot)ethz(dot)ch
PostgreSQL version: 16.0
Operating system: Ubuntu 20.04
Description:

My fuzzer finds a bug in Postgres, which triggers an unexpected error.

--- Set up database ---
create table t0 (c1 text, c5 text, c6 text);
create table t2 (vkey int4, c17 text, primary key(vkey));
------------------------

The fuzzer generates a test case:

--- Test case ---
select
rtrim(ref_4.c6, ref_2.c17) as c_0
from
(t0 as ref_0
inner join ((t0 as ref_1
full outer join (t2 as ref_2
right outer join t2 as ref_3
on (ref_2.vkey = ref_3.vkey))
on (ref_1.c1 = ref_2.c17))
left outer join t0 as ref_4
on (ref_1.c5 = ref_4.c1))
on (ref_0.c6 = ref_4.c1))
except all
select ref_6.c17 as c_0 from t2 as ref_6;
------------------------

--- Expected behavior ---
The test case should not trigger any error.

--- Actual behavior ---
The test case trigger an error:

ERROR: no relation entry for relid 3

--- Postgres version ---
Github commit: 26f988212eada9c586223cbbf876c7eb455044d9
Version: PostgreSQL 17devel on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu
9.4.0-1ubuntu1~20.04.2) 9.4.0, 64-bit

--- Platform information ---
Platform: Ubuntu 20.04
Kernel: Linux 5.4.0-147-generic

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2023-10-26 15:11:39 BUG #18171: Dropping an index on a partitioned table drops all child indices even with a restrict
Previous Message Amit Langote 2023-10-26 03:01:59 Re: AW: AW: BUG #18147: ERROR: invalid perminfoindex 0 in RTE with relid xxxxx