Even more fun:
[Expert@fwmgmt:0]# psql_client cpm postgres -c "select objid,applicationname,username,numberoflocks from worksession where not state='PUBLISHED' and numberoflocks > 0;"
objid | applicationname | username | numberoflocks
--------------------------------------+---------------------------+------------+---------------
b15c8521-dfa0-4ac1-aaf0-d93c421f4807 | SmartConsole | admin-hvdk | 5
47c02486-942b-41f0-9cc3-cb68101683c7 | WEB_API | admin-hvdk | 1182
bbf33d06-de48-4c3e-bd72-43e34c7903f8 | Endpoint Security Console | admin-hvdk | 1
b90522cd-53c8-4d75-a58c-e441f77d95d4 | Endpoint Security Console | admin-hvdk | 1
6c4e69fa-92d4-44da-b377-c25390e1da01 | Endpoint Security Console | admin-hvdk | 3
5cd20dc9-6a77-4456-a733-c5bcae44e5b4 | SmartConsole | admin-hvdk | 1
(6 rows)
Then you can use the objid to discard or publish that session.
Mind you that you be careful as you do a lot of damage if you discard or publish the wrong session.
<< We make miracles happen while you wait. The impossible jobs take just a wee bit longer. >>