Query on Postgres locks - Mailing list pgsql-admin

From Porwal, Utkarsh
Subject Query on Postgres locks
Date
Msg-id 182E8934F4D0094A94B8A0E5A48B8F5A35609F4D@MX105CL01.corp.emc.com
Whole thread Raw
Responses Re: Query on Postgres locks  ("Porwal, Utkarsh" <utkarsh.porwal@emc.com>)
List pgsql-admin

Dear All,

 

I have a perl script which will attempt to drop/recreate some intermediate tables.  This works by trying to acquire an access exclusive lock on the intermediate tables.

 

When there is a backup running through pg_dump, I see an entry in pg_locks/pg_stat_activity table for the above which is waiting for pg_dump to finish, which is expected.

 

Since backup on huge environment takes around 8 hrs to complete, I noticed that the entries waiting for locks are removed after certain amount of time which I couldn’t record even though the perl script is still running.

Do you guys know if the lock waiting will ultimately timeout and when? I don’t have any statement_timeout specified.

 

Any pointers on this behavior?

 

Regards,

Utkarsh

pgsql-admin by date:

Previous
From: "Tirumalaraju, Ravikumar (GE Corporate, consultant)"
Date:
Subject: Re: Need help...
Next
From: "Porwal, Utkarsh"
Date:
Subject: Re: Query on Postgres locks