pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Lakhin <exclusion@gmail.com>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Avoid orphaned objects dependencies, take 3
Date: Thu, 25 Apr 2024 09:00:00 +0300
Message-ID: <403075e1-4d60-09e2-a06a-749cd9d88f66@gmail.com> (raw)
In-Reply-To: <ZinjZmaMEEkOSfZ0@ip-10-97-1-34.eu-west-3.compute.internal>
References: <ZiYjn0eVc7pxVY45@ip-10-97-1-34.eu-west-3.compute.internal>
	<b206ef05-275d-7306-9ee2-ece738beb371@gmail.com>
	<ZiZBZSgWuSC0C1RJ@ip-10-97-1-34.eu-west-3.compute.internal>
	<a0e850b9-31c6-86cd-351d-6b8a7a1d6bf7@gmail.com>
	<ZidAHRJyMzPZ5JtJ@ip-10-97-1-34.eu-west-3.compute.internal>
	<Ziff3vGRKv1LUjY7@ip-10-97-1-34.eu-west-3.compute.internal>
	<ZijE6UBCo02U2TXJ@ip-10-97-1-34.eu-west-3.compute.internal>
	<62310067-6dc4-97ab-6724-7d3602b5056d@gmail.com>
	<ZinjZmaMEEkOSfZ0@ip-10-97-1-34.eu-west-3.compute.internal>

Hi,

25.04.2024 08:00, Bertrand Drouvot wrote:
>
>> though concurrent create/drop operations can still produce
>> the "cache lookup failed" error, which is probably okay, except that it is
>> an INTERNAL_ERROR, which assumed to be not easily triggered by users.
> I did not see any of those "cache lookup failed" during my testing with/without
> your script. During which test(s) did you see those with v3 applied?

You can try, for example, table-trigger, or other tests that check for
"cache lookup failed" psql output only (maybe you'll need to increase the
iteration count). For instance, I've got (with v4 applied):
2024-04-25 05:48:08.102 UTC [3638763] ERROR:  cache lookup failed for function 20893
2024-04-25 05:48:08.102 UTC [3638763] STATEMENT:  CREATE TRIGGER modified_c1 BEFORE UPDATE OF c ON t
         FOR EACH ROW WHEN (OLD.c <> NEW.c) EXECUTE PROCEDURE trigger_func('modified_c');

Or with function-function:
2024-04-25 05:52:31.390 UTC [3711897] ERROR:  cache lookup failed for function 32190 at character 54
2024-04-25 05:52:31.390 UTC [3711897] STATEMENT:  CREATE FUNCTION f1() RETURNS int LANGUAGE SQL RETURN f() + 1;
--
2024-04-25 05:52:37.639 UTC [3720011] ERROR:  cache lookup failed for function 34465 at character 54
2024-04-25 05:52:37.639 UTC [3720011] STATEMENT:  CREATE FUNCTION f1() RETURNS int LANGUAGE SQL RETURN f() + 1;

> Attached v4, simply adding more tests to v3.

Thank you for working on this!

Best regards,
Alexander

view thread (93+ messages)  latest in thread

Message-ID: <403075e1-4d60-09e2-a06a-749cd9d88f66@gmail.com>
Permalink:  ../403075e1-4d60-09e2-a06a-749cd9d88f66@gmail.com/
Also on:    postgresql.org/message-id/403075e1-4d60-09e2-a06a-749cd9d88f66@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: exclusion@gmail.com, bertranddrouvot.pg@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Avoid orphaned objects dependencies, take 3
  In-Reply-To: <403075e1-4d60-09e2-a06a-749cd9d88f66@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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