Re: How to check whether table is busy or free before running the ALTER or creating TRIGGER on that table

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Raghavendra Rao J S V <raghavendrajsv(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: How to check whether table is busy or free before running the ALTER or creating TRIGGER on that table
Date: 2018-08-21 14:17:08
Message-ID: bc88dbb8-5585-7fc0-3f8f-f7459bb69606@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ravi Krishna 2018-08-21 15:00:03 COPY FROM - to avoid WAL generation
Previous Message Raghavendra Rao J S V 2018-08-21 13:25:33 How to check whether table is busy or free before running the ALTER or creating TRIGGER on that table