Re: Soundness of strategy for detecting locks acquired by DDL statements
Adrian Klaver <adrian.klaver@aklaver.com>
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Agis Anastasopoulos <agis.anast@gmail.com>,
pgsql-general@lists.postgresql.org
Date: 2025-05-06T18:31:35Z
Lists: pgsql-general
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