By definition, statistics is the science that uses probabilistic theories to explain the frequency of the occurrence of events. The Heroku Postgres provides some extensions for database statistics and tables. In upcoming sections, you will learn about them.
This extension provides a function called pgrowlocks
to display locked rows in a specific table.
First, you must install the extension:
$ heroku pg:psql --app your-app-name CREATE EXTENSION pgrowlocks;
The pgrowlocks
function accepts a parameter that is the table name. For example:
SELECT * FROM pgrowlocks('users'); locked_row| lock_type | locker | multi | xids | pids ----------+-----------+--------+-------+-----------+--------- (0,1) | Shared | 22 | t | {378,809} | {23457} (0,2) | Exclusive | 345 | f | {780} | {12869}
For details, visit the documentation at http://www.postgresql.org/docs/current/static/pgrowlocks.html.