Finding detailed information about LOCKS

Поиск
Список
Период
Сортировка
От Wetmore, Matthew (CTR)
Тема Finding detailed information about LOCKS
Дата
Msg-id 2d059728dc1b49e8899bf16fd85356ba@evernorth.com
обсуждение исходный текст
Ответ на Re: Finding detailed information about LOCKS  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: Finding detailed information about LOCKS  (Siraj G <tosiraj.g@gmail.com>)
Список pgsql-admin
If you can't get pgwatch2

Cron job that runs every hour:

grep -E "lock" (or whatever search term) postgresql.log > lock_history.txt

Or something to that effect, not as good as the tool obviously, but a workingperson's solution.

-----Original Message-----
From: Laurenz Albe <laurenz.albe@cybertec.at> 
Sent: Thursday, May 2, 2024 11:16 PM
To: Siraj G <tosiraj.g@gmail.com>; Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: [EXTERNAL] Re: Finding detailed information about LOCKS

On Fri, 2024-05-03 at 10:54 +0530, Siraj G wrote:
> I come from Oracle background. In Oracle there is a licensed feature 
> (Diagnostics + Tuning) upon using which the system keeps historic 
> session records, which gives a better way to find out locking related 
> details- like the blocking session, total sessions blocked and the 
> time the blocking event was active. I am finding it a little hard in PgSQL to find this information.
> 
> I am seeking help in finding a detailed analysis on the locks that 
> happened yesterday,
> 2 days back or in the last week. Can someone assist please.

PostgreSQL doesn't keep historical information on these things.

You need a monitoring tool like pgwatch2 that takes regular snapshots of these data and allows you to access this
information.

Yours,
Laurenz Albe



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

Предыдущее
От: "Dischner, Anton"
Дата:
Сообщение: AW: postgresql in docker to improve security
Следующее
От: M Sarwar
Дата:
Сообщение: ERROR: return and sql tuple descriptions are incompatible