Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rzs9S-007WAy-4X for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Apr 2024 06:00:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rzs9Q-003QLo-5V for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Apr 2024 06:00:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rzs9P-003QLg-Qb for pgsql-hackers@lists.postgresql.org; Thu, 25 Apr 2024 06:00:07 +0000 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rzs9L-002pkf-Pu for pgsql-hackers@lists.postgresql.org; Thu, 25 Apr 2024 06:00:07 +0000 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2d858501412so6890021fa.0 for ; Wed, 24 Apr 2024 23:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714024802; x=1714629602; darn=lists.postgresql.org; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=km/MUNQQKv+h78YRyq/KJT8woMgvb2JFb8MZFcK82JM=; b=nh+oU2pgHApfZR8heMedmYk2AG293uXu58AJPMLRz5jHNGH2Tdv0DEPjzJLOMBS6Ob uW9V7add9qEhq+i+IXLaMDet8thTZAbmxXyMijmePUKb3JdnfXYeq80GG9kdiNXvdaLq jE4TUnUUfcseu+19aBE/IpKCjeyBuCbY+ftIcjC9WS2fBt9dGBXjrbi2XHb/VguMtObm IUkgefzsZDuntCdGv3RhCgIHdBocC6vnneXXO45I/QoVrmv0HdUYbA8NmeT5/9RJQpti 6U43kjCfeETZfa3bnLP/Gk8HRHmgV3Mar2ypX4CHCMvdOqQ9CpzVItJ/od7hEyN6ppgh //Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714024802; x=1714629602; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=km/MUNQQKv+h78YRyq/KJT8woMgvb2JFb8MZFcK82JM=; b=GeF8aXRxwSsGrbmDCF1yhcJ7BGSF+hbNZVH1hbeUXLX24OmJRdAnQbSCYJ4crv79lK g3dXdFRc7lN3j6de89cZ3/V86MaEsWqyAshHJUqVDjcoKkl7dT7IBWgaLSAIfmIoplfj HQ8v8PtzyaRWbaS9YZCzSc2jG4m3neWSyd+Fz5WESt4UDvOWSGMADmsyVybfoZlPJLmM HP9A7yaXIh8+w36DlUMz6Kawq6zXKtgV+5ySRK3u5Jzs91hyvDzQue5oegmhsxeJN6nO oPMUl4otFQHC41xdT5QcZNaXHZ21x6lilAkczIwn8UA/X8ianiy8qghVfSTpOou3Drz6 0N0g== X-Gm-Message-State: AOJu0Yzt+BPhdkx7K6yJEoUXnnVbBL+/Ufmub4o0oAoKKaQ1hRL6IjS6 TXViQYmz4K1oTV5wZvbDlbGfJdKbmGT96/YDCevfnEV/DZEajwC0yj2yjA== X-Google-Smtp-Source: AGHT+IGAWFYFt/4TPZmPFeVIlWwBqP5NqMIy+2xvPERPcFoTGkguRzVLLpVN/paSnJu0G0wRGK1Hyw== X-Received: by 2002:a05:651c:39e:b0:2d6:eaa7:2cf8 with SMTP id e30-20020a05651c039e00b002d6eaa72cf8mr2619249ljp.16.1714024801582; Wed, 24 Apr 2024 23:00:01 -0700 (PDT) Received: from [1.0.0.7] ([178.155.19.141]) by smtp.gmail.com with ESMTPSA id bj24-20020a2eaa98000000b002da080a84cfsm2225176ljb.23.2024.04.24.23.00.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Apr 2024 23:00:01 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------Im8xBPm3G0bHLDTpGEgVT8RQ" Message-ID: <403075e1-4d60-09e2-a06a-749cd9d88f66@gmail.com> Date: Thu, 25 Apr 2024 09:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Avoid orphaned objects dependencies, take 3 Content-Language: en-US To: Bertrand Drouvot Cc: pgsql-hackers@lists.postgresql.org References: <62310067-6dc4-97ab-6724-7d3602b5056d@gmail.com> From: Alexander Lakhin In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------Im8xBPm3G0bHLDTpGEgVT8RQ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 --------------Im8xBPm3G0bHLDTpGEgVT8RQ Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
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
--------------Im8xBPm3G0bHLDTpGEgVT8RQ--