pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #18458: SQL Error [XX000]: ERROR: cache lookup failed for type 0
3+ messages / 3 participants
[nested] [flat]
* BUG #18458: SQL Error [XX000]: ERROR: cache lookup failed for type 0
@ 2024-05-07 09:47 PG Bug reporting form <noreply@postgresql.org>
2024-05-07 11:18 ` Re: BUG #18458: SQL Error [XX000]: ERROR: cache lookup failed for type 0 Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 1 reply; 3+ messages in thread
From: PG Bug reporting form @ 2024-05-07 09:47 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: stepya@ukr.net
The following bug has been logged on the website:
Bug reference: 18458
Logged by: Stepan Yankevych
Email address: stepya@ukr.net
PostgreSQL version: 15.6
Operating system: CentOS Linux release 7.9.2009 (Core)
Description:
pg 15.6 / 15.3
Citus 12.1.1 / 12.1.3
autoexplain ON
test case
CREATE TABLE billing.test_table
( report_id int8 NULL,
date_id int4 NOT NULL);
SELECT create_distributed_table('test_table', 'report_id');
CREATE OR REPLACE PROCEDURE billing.test_delete_from(p_date_id int)
LANGUAGE plpgsql AS
$body$
BEGIN
DELETE FROM billing.test_table
WHERE date_id = p_date_id;
END;
$body$;
CALL billing.test_delete_from(20240401);
SQL Error [XX000]: ERROR: cache lookup failed for type 0
Where: SQL statement "DELETE FROM billing.test_table
WHERE date_id = p_date_id"
PL/pgSQL function test_delete_from(integer) line 3 at SQL statement
BUT if we use constant instead of parameter then everything works fine
CREATE OR REPLACE PROCEDURE billing.test_delete_from(p_date_id int)
LANGUAGE plpgsql AS
$body$
BEGIN
DELETE FROM billing.test_table
WHERE date_id = 20240401;
END;
$body$;
Also using Function instead of procedure works fine.
Disabling auto_explain resolves the issue.
So looks like a bug some incompatibility between Citus/autoexplain while
using delete inside procedure
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #18458: SQL Error [XX000]: ERROR: cache lookup failed for type 0
2024-05-07 09:47 BUG #18458: SQL Error [XX000]: ERROR: cache lookup failed for type 0 PG Bug reporting form <noreply@postgresql.org>
@ 2024-05-07 11:18 ` Laurenz Albe <laurenz.albe@cybertec.at>
2024-05-09 10:17 ` RE: BUG #18458: SQL Error [XX000]: ERROR: cache lookup failed for type 0 Stepan Yankevych <Stepan_Yankevych@epam.com>
0 siblings, 1 reply; 3+ messages in thread
From: Laurenz Albe @ 2024-05-07 11:18 UTC (permalink / raw)
To: stepya@ukr.net; pgsql-bugs@lists.postgresql.org
On Tue, 2024-05-07 at 09:47 +0000, PG Bug reporting form wrote:
> So looks like a bug some incompatibility between Citus/autoexplain while
> using delete inside procedure
Looks like it. You should complain to Microsoft.
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 3+ messages in thread
* RE: BUG #18458: SQL Error [XX000]: ERROR: cache lookup failed for type 0
2024-05-07 09:47 BUG #18458: SQL Error [XX000]: ERROR: cache lookup failed for type 0 PG Bug reporting form <noreply@postgresql.org>
2024-05-07 11:18 ` Re: BUG #18458: SQL Error [XX000]: ERROR: cache lookup failed for type 0 Laurenz Albe <laurenz.albe@cybertec.at>
@ 2024-05-09 10:17 ` Stepan Yankevych <Stepan_Yankevych@epam.com>
0 siblings, 0 replies; 3+ messages in thread
From: Stepan Yankevych @ 2024-05-09 10:17 UTC (permalink / raw)
To: Laurenz Albe <laurenz.albe@cybertec.at>; stepya@ukr.net <stepya@ukr.net>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Posted bug in citus bug tracker as well https://github.com/citusdata/citus/issues/7596
But just to be honest I guess the issue should/could be fixed on the pg_auto_expaine side.
Stepan Yankevych
Senior Software Engineering Manager
Office: +380 44 390 5457x58840 Mobile: +380 96 915 9551
Uhorska St., 14, Building One Lviv Ukraine Office Timezone: (UTC+03:00)
Working Remotely Timezone: (UTC+03:00)
Microsoft Teams | LinkedIn
EPAM.COM
confidentiality caution and disclaimer
This message is intended only for the use of the individual(s) or entity(ies) to which it is addressed and contains confidential information that may be legally privileged. If you are not the intended recipient, or authorized to read this message on behalf of the intended recipient, do not read, disseminate, distribute or copy this message and please delete this message and destroy any printed copies.
-----Original Message-----
From: Laurenz Albe <laurenz.albe@cybertec.at>
Sent: Tuesday, May 7, 2024 2:19 PM
To: stepya@ukr.net; pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18458: SQL Error [XX000]: ERROR: cache lookup failed for type 0
On Tue, 2024-05-07 at 09:47 +0000, PG Bug reporting form wrote:
> So looks like a bug some incompatibility between Citus/autoexplain
> while using delete inside procedure
Looks like it. You should complain to Microsoft.
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-05-09 10:17 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-05-07 09:47 BUG #18458: SQL Error [XX000]: ERROR: cache lookup failed for type 0 PG Bug reporting form <noreply@postgresql.org>
2024-05-07 11:18 ` Laurenz Albe <laurenz.albe@cybertec.at>
2024-05-09 10:17 ` Stepan Yankevych <Stepan_Yankevych@epam.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox