Re: Query on Postgres locks

Поиск
Список
Период
Сортировка
От Wei Shan
Тема Re: Query on Postgres locks
Дата
Msg-id CAFe9ZTq8ji-k5EzRz=OftpFhyeC0Sv6PcrGEEjb2bshU0fY39g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Query on Postgres locks  ("Porwal, Utkarsh" <utkarsh.porwal@emc.com>)
Ответы Re: Query on Postgres locks
Список pgsql-admin
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> wrote:

The postgres version is –

 

psql (9.0.7)

 

 

From: 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
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

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Porwal, Utkarsh"
Дата:
Сообщение: Re: Query on Postgres locks
Следующее
От: "Porwal, Utkarsh"
Дата:
Сообщение: Re: Query on Postgres locks