Re: RFC: listing lock status
От | Joe Conway |
---|---|
Тема | Re: RFC: listing lock status |
Дата | |
Msg-id | 3D373D65.5050107@joeconway.com обсуждение исходный текст |
Ответ на | RFC: listing lock status (nconway@klamath.dyndns.org (Neil Conway)) |
Ответы |
Re: RFC: listing lock status
Re: RFC: listing lock status |
Список | pgsql-hackers |
Neil Conway wrote:> I've been working on the TODO list item "Add SHOW command to display> locks". The code is basically finished,but I'd like to make sure the> user interface is okay with everyone before I send it in to -patches> (if you'reinterested, the patch is attached).>> Rather than adding another SHOW command, I think using a table> function is abetter idea. That's because the information returned by> the lock listing code will often need to be correlated with other>information in the system catalogs, or sorted/aggregated in various> ways (e.g. "show me the names of all locked relations",or "show me> the relation with the most AccessShareLocks'"). Written as a table> function, the lock listing codeitself can be fairly simple, and the> DBA can write the necessary SQL queries to produce the information he> needs. Italso makes it easier to parse the lock status information,> if you're writing (for example) a GUI admin tool. I'm undoubtedly biased ;-), but I like your approach. Applies and works fine here. > Also, should locks on special relations (e.g. pg_xactlock) or on> system catalogs be shown? Maybe the function should take a boolean parameter to indicate whether or not to show locks on objects in pg_* schema? Joe
В списке pgsql-hackers по дате отправления: