Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/maintenance.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/maintenance.xml,v
diff -u -r1.12.2.2 -r1.12.2.3
--- openacs-4/packages/acs-core-docs/www/xml/install-guide/maintenance.xml 5 Jul 2004 19:47:36 -0000 1.12.2.2
+++ openacs-4/packages/acs-core-docs/www/xml/install-guide/maintenance.xml 27 Nov 2004 01:32:55 -0000 1.12.2.3
@@ -719,6 +719,8 @@
+
+
Identify a runaway Oracle query: first, use ps aux or top to get the UNIX process ID of a runaway Oracle process.
Log in to SQL*Plus as the admin:
@@ -756,6 +758,31 @@
alter system kill session 'SID,SERIAL#'; --substitute values for SID and SERIAL#
(See Andrew Piskorski's Oracle notes)
+
+
+ Identify a runaway Postgres query. First, logging must be enabled in the database. This imposes a performance penalty and should not be done in normal operation.
+ Edit the file postgresql.conf - its location depends on the PostGreSQL installation - and change
+ #stats_command_string = false
+ to
+ stats_command_string = true
+ Next, connect to postgres (psql service0) and select * from pg_stat_activity;. Typical output should look like:
+
+ datid | datname | procpid | usesysid | usename | current_query
+----------+-------------+---------+----------+---------+-----------------
+ 64344418 | openacs.org | 14122 | 101 | nsadmin | <IDLE>
+ 64344418 | openacs.org | 14123 | 101 | nsadmin |
+ delete
+ from acs_mail_lite_queue
+ where message_id = '2478608';
+ 64344418 | openacs.org | 14124 | 101 | nsadmin | <IDLE>
+ 64344418 | openacs.org | 14137 | 101 | nsadmin | <IDLE>
+ 64344418 | openacs.org | 14139 | 101 | nsadmin | <IDLE>
+ 64344418 | openacs.org | 14309 | 101 | nsadmin | <IDLE>
+ 64344418 | openacs.org | 14311 | 101 | nsadmin | <IDLE>
+ 64344418 | openacs.org | 14549 | 101 | nsadmin | <IDLE>
+(8 rows)
+openacs.org=>
+