From: Alvaro Aguayo <aaguayo@opensysperu.com>
To: Yambu <hyambu@gmail.com>
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: RE: Locks
Date: Mon, 16 Nov 2020 18:06:12 +0000
Message-ID: <SC1P15201MB22384E579053E82636DE6D8DAFE30@SC1P15201MB2238.LAMP152.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CALhHtcBm-+Ois+czF+i-garOnEekojViUkvpYnudnvoaDLKVAg@mail.gmail.com>
References: <CALhHtcBm-+Ois+czF+i-garOnEekojViUkvpYnudnvoaDLKVAg@mail.gmail.com>
Hi.
If you mean currently held locks, there is some info in pg_locks & pg_stat_activity which may be helpful for you. Check the Wiki: https://wiki.postgresql.org/wiki/Lock_Monitoring
Regards,
Alvaro Aguayo
From: Yambu <hyambu@gmail.com>
Sent: 16 November 2020 12:51
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Locks
Hi
How can i find out when a lock happened?
Im writing a function that will check why some queries ran slowly at particular times, so i want to know if i can store lock information somewhere and retrieve what time the lock happened?
regards
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: aaguayo@opensysperu.com, hyambu@gmail.com, pgsql-admin@lists.postgresql.org
Subject: RE: Locks
In-Reply-To: <SC1P15201MB22384E579053E82636DE6D8DAFE30@SC1P15201MB2238.LAMP152.PROD.OUTLOOK.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