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 1s6qpH-0027P8-MK for pgsql-hackers@arkaria.postgresql.org; Tue, 14 May 2024 12:00:13 +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 1s6qpG-00DhEu-C4 for pgsql-hackers@arkaria.postgresql.org; Tue, 14 May 2024 12:00:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s6qpG-00DhEc-2O for pgsql-hackers@lists.postgresql.org; Tue, 14 May 2024 12:00:10 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s6qp9-0009di-D8 for pgsql-hackers@lists.postgresql.org; Tue, 14 May 2024 12:00:08 +0000 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-520f9d559f6so6437356e87.3 for ; Tue, 14 May 2024 05:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715688002; x=1716292802; darn=lists.postgresql.org; h=content-transfer-encoding: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=SBMW6VtvYFl4AbWdEX9OgzMDXMIuRLZRVycB77Ayea4=; b=K7VlQ35J25IwTHPP2Rm43mAmVis40GcYv1fPevkqftR/sRyJjvHhAm5Xf9+CmSZnc5 gOU3vzXrMKAg0SKc00i7hW9XRnRlXrp07oksU27J/hfpJpkgwIsEdiszE0GdlmABK5m1 /2dV2g/PLtmilv2CLz2dE51mLNZ6OcYnN8kSW91DEzbe4JkTJJ9NXe5p+3BQ/h2Kk6f2 ay8WCFBwyEgqCU0Pz0muKgC3s35sQ2PM79gRRyNPo0kFPmaxro3hjqJObkcbwpcqTo5p 7jG3H5vRVZT0Y+y3cVD5dHo61RI+xRJa9VLjv074sQS2gGCEFVz1X6STpPLJzfe65VIx z2jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715688002; x=1716292802; h=content-transfer-encoding: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=SBMW6VtvYFl4AbWdEX9OgzMDXMIuRLZRVycB77Ayea4=; b=mh6L+1qVfedlyl9Li6bU6Zmm6sSihcZwXjjqUzM7uHmX9cjHuZffdXXeyZ6/XDKu79 XZFUqapuW7EL+40LxHloYIJU9/dgKPyGPc/NwYUES7FFchcJ3xEIqj3bXat3Xqgos5v8 VdIrDLROrlh31ShxE+kaTNgNZi6Go2WtqBP3feqlhb8ppKs95uEkI9aolUccAMkDvUJI 307qkJP+hhRGtCGlsD+9hINk36ti3MtCDHMn9eR86R79M7S+V8/UUwIckPovUJhwxi++ BRGd42W2B/Fu8eaRVsXfiHX1/BaKl/b8/XOqUbkDiYlnzr3OyrYOh2nGdKn/9/2ub29H gAbg== X-Gm-Message-State: AOJu0YxkXdJvKhdSATw5mJoYqHI8SuhFYMUarrax3mIx+QWRAyc2EhUE kUOEuWwBha5JrsH8CRQ3z2zxS4IR5lAErzhbAqFUBgToND48Oor0 X-Google-Smtp-Source: AGHT+IGUmcsFnz6fPFCr5JUICAbNdBVT/ZPzyEo2USNWvEDmE484Wam/lpZG1aqZ8rZNrfqwHuf58A== X-Received: by 2002:a05:6512:1105:b0:51c:dc6:a1cf with SMTP id 2adb3069b0e04-5220fc734ecmr9471786e87.34.1715688001417; Tue, 14 May 2024 05:00:01 -0700 (PDT) Received: from [1.0.0.7] ([178.155.16.152]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-521f35ad62asm2167734e87.44.2024.05.14.05.00.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 May 2024 05:00:01 -0700 (PDT) Message-ID: <1cec7fb9-e7ac-8523-06fd-60b25c9a7b7d@gmail.com> Date: Tue, 14 May 2024 15: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> <403075e1-4d60-09e2-a06a-749cd9d88f66@gmail.com> From: Alexander Lakhin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Bertrand, 09.05.2024 15:20, Bertrand Drouvot wrote: > Oh I see, your test updates an existing dependency. v4 took care about brand new > dependencies creation (recordMultipleDependencies()) but forgot to take care > about changing an existing dependency (which is done in another code path: > changeDependencyFor()). > > Please find attached v5 that adds: > > - a call to the new depLockAndCheckObject() function in changeDependencyFor(). > - a test when altering an existing dependency. > > With v5 applied, I don't see the issue anymore. Me too. Thank you for the improved version! I will test the patch in the background, but for now I see no other issues with it. Best regards, Alexander