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 1s7A4V-0041ql-VP for pgsql-hackers@arkaria.postgresql.org; Wed, 15 May 2024 08:33: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 1s7A4V-00C5H3-Se for pgsql-hackers@arkaria.postgresql.org; Wed, 15 May 2024 08:33:11 +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 1s7A4V-00C5Gv-JL for pgsql-hackers@lists.postgresql.org; Wed, 15 May 2024 08:33:11 +0000 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s7A4R-000Klc-Lb for pgsql-hackers@lists.postgresql.org; Wed, 15 May 2024 08:33:10 +0000 Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2e1fa1f1d9bso113774621fa.0 for ; Wed, 15 May 2024 01:33:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715761987; x=1716366787; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=JvOxjSg88nx6wVtr4DP6ViH1wLNbXax9r8iz+Y0v+GE=; b=NeFY6xWAApdRC6Qn+oZ0hhFAID1Oio+zfvNe7izAe/Sc+QQM2VYLDzZYQhH+SfwhWl hiHecEOudQ8zOqVgpCntvwdmvnlfNnI6aTeEBRS7KoQdBH0FXsxs7XC2Q08IaR+gksYF yenjqOyg/rJko3VfAxEEZksEQS6bfZELsWXMU80NIwyXqGmXy/Isg4s71OEA2FFR283R cS9SKC5RExz7t25CDRlenA4a//tA3DznJPd9+WSETc807SxHHvayyXyQcdTJqG/m6s4k nuHghx2Jy5AbyIlgNy420eqbsqrgm47YE88NFiu/8GXkvx6xCOfVasM+iQlGg3HAb5kE 27YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715761987; x=1716366787; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=JvOxjSg88nx6wVtr4DP6ViH1wLNbXax9r8iz+Y0v+GE=; b=DbR/xD50I5EUWpdpd0deV1ceubs7pdUweyaHBVAfN8uqI2++ZQsSvKojmQce0KNmTd FAoRtojvsZLDBRLSTYKMKBwng7u5/eWDlCXF/bq0X5/xBa8cy396zg283iHSGXuN5L7n w4DNo+ZVCIme/xlui/yb7i+iy8VnRqMLTlAfLb6AyoE8V52pNUPB8x6jE5rkSPJ5FVcu 3OwvpXpP32CyJ0tjLhOlnEgEunZfVlsL6n/QuHErvXxsD7nuwL62LV3z43q6JDYNVvq2 Iv+Hcd8fjxUc+L7khbuNDhAatDu2UhbSZZvUY52BnmxyLwwBcF4bR9mdHksXznGfzEuS S2UQ== X-Gm-Message-State: AOJu0YwlwSN1swg6noD8hJDMRwzzXNz8gErUVZdVfJUeuUGrx1xKAOhF 1QAdnjh0aC6RMntV+KElcFMeqb+RlhNkWu7TZGCTeXPgvttsdkkG X-Google-Smtp-Source: AGHT+IHHiJo0/uAuYS5AW2qgkIh7ZZFJte1v9+1fBDCFsu5PIQcnyJ4GUEgD8Tg9Z7kWJGMJZAdfmA== X-Received: by 2002:a2e:8014:0:b0:2e4:a8c3:7618 with SMTP id 38308e7fff4ca-2e51fd45319mr115591431fa.16.1715761987337; Wed, 15 May 2024 01:33:07 -0700 (PDT) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-236-134-5.eu-west-3.compute.amazonaws.com. [15.236.134.5]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502bbbc35asm15694951f8f.109.2024.05.15.01.33.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 01:33:07 -0700 (PDT) Date: Wed, 15 May 2024 08:33:05 +0000 From: Bertrand Drouvot To: Alexander Lakhin Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Avoid orphaned objects dependencies, take 3 Message-ID: References: <62310067-6dc4-97ab-6724-7d3602b5056d@gmail.com> <403075e1-4d60-09e2-a06a-749cd9d88f66@gmail.com> <1cec7fb9-e7ac-8523-06fd-60b25c9a7b7d@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1cec7fb9-e7ac-8523-06fd-60b25c9a7b7d@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Tue, May 14, 2024 at 03:00:00PM +0300, Alexander Lakhin wrote: > 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. Thanks for confirming! Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com