From: Jan Harasym <jan.harasym@massive.se>
To: Porwal, Utkarsh <utkarsh.porwal@emc.com>
To: Wei Shan <weishan.ang@gmail.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Query on Postgres locks
Date: Thu, 24 Sep 2015 14:59:55 +0000
Message-ID: <e0d93344ed0a4c80b11f4ede24c7d007@pdc-mail-exch05.ubisoft.org> (raw)
In-Reply-To: <182E8934F4D0094A94B8A0E5A48B8F5A3560A239@MX105CL01.corp.emc.com>
References: <182E8934F4D0094A94B8A0E5A48B8F5A35609F4D@MX105CL01.corp.emc.com>
<182E8934F4D0094A94B8A0E5A48B8F5A35609F81@MX105CL01.corp.emc.com>
<CAFe9ZTq8ji-k5EzRz=OftpFhyeC0Sv6PcrGEEjb2bshU0fY39g@mail.gmail.com>
<182E8934F4D0094A94B8A0E5A48B8F5A3560A239@MX105CL01.corp.emc.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
For many things “0” is “disabled”
So there is no timeout, it will wait forever.
From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Porwal, Utkarsh
Sent: September 24, 2015 12:37 PM
To: Wei Shan
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Query on Postgres locks
Hi Wei shan,
For me the statement_timeout is defaulted to zero
statement_timeout | 0 | ms
Thanks and Regards,
Utkarsh Porwal
From: Wei Shan [mailto:weishan.ang@gmail.com]
Sent: Thursday, September 24, 2015 3:49 PM
To: Porwal, Utkarsh
Cc: pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>
Subject: Re: [ADMIN] Query on Postgres locks
Hi,
If you look at pg_settings table, you can see the default value for statement_timeout. Only from 9.3, there's a parameter called lock_timeout.
Cheers.
On 24 September 2015 at 17:37, Porwal, Utkarsh <utkarsh.porwal@emc.com<mailto:utkarsh.porwal@emc.com>> wrote:
The postgres version is –
psql (9.0.7)
From: pgsql-admin-owner@postgresql.org<mailto:pgsql-admin-owner@postgresql.org> [mailto:pgsql-admin-owner@postgresql.org<mailto:pgsql-admin-owner@postgresql.org>] On Behalf Of Porwal, Utkarsh
Sent: Thursday, September 24, 2015 3:04 PM
To: pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>
Subject: [ADMIN] Query on Postgres locks
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
--
Regards,
Ang Wei Shan
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-admin@postgresql.org
Cc: jan.harasym@massive.se, utkarsh.porwal@emc.com, weishan.ang@gmail.com
Subject: Re: Query on Postgres locks
In-Reply-To: <e0d93344ed0a4c80b11f4ede24c7d007@pdc-mail-exch05.ubisoft.org>
References: <182E8934F4D0094A94B8A0E5A48B8F5A35609F4D@MX105CL01.corp.emc.com> <182E8934F4D0094A94B8A0E5A48B8F5A35609F81@MX105CL01.corp.emc.com> <CAFe9ZTq8ji-k5EzRz=OftpFhyeC0Sv6PcrGEEjb2bshU0fY39g@mail.gmail.com> <182E8934F4D0094A94B8A0E5A48B8F5A3560A239@MX105CL01.corp.emc.com> <e0d93344ed0a4c80b11f4ede24c7d007@pdc-mail-exch05.ubisoft.org>
* 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