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're interested, the patch is attached).
 >
 > Rather than adding another SHOW command, I think using a table
 > function is a better 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 code itself can be fairly simple, and the
 > DBA can write the necessary SQL queries to produce the information he
 > needs. It also 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


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to