From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Raghavendra Rao J S V <raghavendrajsv@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: How to check whether table is busy or free before running the ALTER or creating TRIGGER on that table
Date: Tue, 21 Aug 2018 07:17:08 -0700
Message-ID: <bc88dbb8-5585-7fc0-3f8f-f7459bb69606@aklaver.com> (raw)
In-Reply-To: <CAEHH7R6MFc5j1+WWh=Nc_Lsvdc36DQD3-fmEDs9ANce4DjZ39A@mail.gmail.com>
References: <CAEHH7R6MFc5j1+WWh=Nc_Lsvdc36DQD3-fmEDs9ANce4DjZ39A@mail.gmail.com>
On 08/21/2018 06:25 AM, Raghavendra Rao J S V wrote:
> *Hi All,*
>
> We have thousands of tables. Out of these tables we have few tables.
> Which are busy some times. If I execute any ALTER statement or creating
> trigger on those tables I am unable to do it. How to check whether table
> is busy or free before running the *ALTER/DDL *or creating *TRIGGER *on
> that table in postgresql database.
Take a look at:
https://www.postgresql.org/docs/10/static/view-pg-locks.html>
> --
> Regards,
> Raghavendra Rao J S V
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, raghavendrajsv@gmail.com
Subject: Re: How to check whether table is busy or free before running the ALTER or creating TRIGGER on that table
In-Reply-To: <bc88dbb8-5585-7fc0-3f8f-f7459bb69606@aklaver.com>
References: <CAEHH7R6MFc5j1+WWh=Nc_Lsvdc36DQD3-fmEDs9ANce4DjZ39A@mail.gmail.com> <bc88dbb8-5585-7fc0-3f8f-f7459bb69606@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox