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 1uCN4y-00EEnW-C0 for pgsql-general@arkaria.postgresql.org; Tue, 06 May 2025 18:31:45 +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 1uCN4x-009ILx-2W for pgsql-general@arkaria.postgresql.org; Tue, 06 May 2025 18:31:43 +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 1uCN4v-009ILn-Rh for pgsql-general@lists.postgresql.org; Tue, 06 May 2025 18:31:42 +0000 Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uCN4s-000Sge-2b for pgsql-general@lists.postgresql.org; Tue, 06 May 2025 18:31:40 +0000 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id CA0B11381002; Tue, 6 May 2025 14:31:37 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Tue, 06 May 2025 14:31:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1746556297; x=1746642697; bh=Cc/XWZoG5pMmzr0jMrjMwjIoqztwT5bzlmp+Py6/kQg=; b= yOxda1eMQZ6edkOmzzA6PgeW47yCT4L6xGxEjgFIJT36Hs6Me3zPoeIMWTcDGzyY DkBzhAW35ZtSMSKcWQWS0NCw2hW257AhOJAqkl7t0mgUA65M2NITt/wLJDf+LQhE D8r7F+qLaJUhUJSKJyu5Rlvm8ldp0x0CO2EsxkN0BlJs5EdJK/LPrmaxAyxkre5C KAmi0SRe8uVwFAQHwpwBUQRKg/mbtVMORDyiR99wmuCdUN2nb/cGgJ/g7OmR+c5k MClgcBFbtog1yZyD3c7OWKmBPd64Luy+fmx0T3gHeQKHF2wVKY0RCCvlAVcCdIsh W38DeZiYg8L6URUjh/OcYQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1746556297; x=1746642697; bh=C c/XWZoG5pMmzr0jMrjMwjIoqztwT5bzlmp+Py6/kQg=; b=N0OiFP5mhUXH8G7vh 7BkTGjQGxt2qSa4kO9IhGX2l0DRHn7LwwcTmWYprnndH+te+GrGo7TP4ZuhYlOl4 F+cYsr9ECVKPNGK3723UHgnXKldqeKnN5HpJaiyelRtJVhqUbmNsCtMMd3/prapv 0lshIQiU04r2f8zsH7cP1EhMS8BqFt5N/LKaRc4MWpgfw9yAXrAdJJsKLU5DzLXL 6lhHCeQ/z8xvHnpcZdL99p1FJLx5E3uhXHByaClKpvMZwFN09M9W0uvZC0QboJ+o qVDll6NrBo4vW5i+TPj92utrdAvBqNo7B3UXVq4blYfawDl5wcpxk4CyV2KaMr6/ EwaEQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvkeegjedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthejredttddv jeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvg hrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeekfeehuddvjeeigfei feejtdduudffledvfeelheeftdeiffeugfdvkeelgedtvdenucffohhmrghinhepphhosh htghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnh gspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprghgihhs rdgrnhgrshhtsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrh grlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 6 May 2025 14:31:36 -0400 (EDT) Message-ID: Date: Tue, 6 May 2025 11:31:35 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Soundness of strategy for detecting locks acquired by DDL statements To: Agis Anastasopoulos , pgsql-general@lists.postgresql.org References: Content-Language: en-US From: Adrian Klaver 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 On 5/6/25 2:06 AM, Agis Anastasopoulos wrote: > Hello! I'd like to "preflight" a given schema migration (i.e. one or > more DDL statements) before applying it to the production database (e.g. > for use in a CI pipeline). I'm thinking of a strategy and would like to > know about its soundness. > Do you think this is a robust way to detect the locks that were > acquired? Are there any caveats/drawbacks/flaws in this strategy? Why not just read this?: https://www.postgresql.org/docs/current/explicit-locking.html > > Thanks in advance > > > -- Adrian Klaver adrian.klaver@aklaver.com