I don’t have documentation on our last update, but I know there have been some struggles with the stats functions on previous updates for us. I’d prefer to push past this with my current workaround, and/or restoring what we absolutely need for core functions. Like I said before, we’ve been relying on our own scripts for statistics and don’t have the need to migrate old stats. I would very much appreciate any insight into the output, though. Our output was verbose (over the character limit here), so I’m going to post the very beginning and then our stack trace.
(postgres7): SELECT * FROM versions WHERE current = 1
(postgres7): SELECT * FROM versions WHERE current = 1 AND product_type = ? AND product = ? [ (0=>‘core’) (1=>‘ojs2’) ]
(postgres7): select version()
(postgres7): SELECT c.relname as “Name”, i.indisunique as “Unique”, i.indkey as “Columns” FROM pg_catalog.pg_class c JOIN pg_catalog.pg_index i ON i.indexrelid=c.oid JOIN pg_catalog.pg_class c2 ON c2.oid=i.indrelid WHERE (c2.relname=‘signoffs’ or c2.relname=lower(‘signoffs’)) AND i.indisprimary=false;
(postgres7): SELECT a.attname,t.typname,a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,a.attnum FROM pg_class c, pg_attribute a,pg_type t WHERE relkind in (‘r’,‘v’) AND (c.relname=‘signoffs’ or c.relname = lower(‘signoffs’)) and a.attname not like ‘…%’ AND a.attnum > 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum
(postgres7): SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE bc.oid = i.indrelid AND ic.oid = i.indexrelid AND (i.indkey[0] = a.attnum OR i.indkey[1] = a.attnum OR i.indkey[2] = a.attnum OR i.indkey[3] = a.attnum OR i.indkey[4] = a.attnum OR i.indkey[5] = a.attnum OR i.indkey[6] = a.attnum OR i.indkey[7] = a.attnum) AND a.attrelid = bc.oid AND bc.relname = ‘signoffs’
(postgres7): SELECT d.adnum as num, d.adsrc as def from pg_attrdef d, pg_class c where d.adrelid=c.oid and c.relname=‘signoffs’ order by d.adnum
(postgres7): SELECT a.attname,t.typname,a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,a.attnum FROM pg_class c, pg_attribute a,pg_type t WHERE relkind in (‘r’,‘v’) AND (c.relname=‘signoffs’ or c.relname = lower(‘signoffs’)) and a.attname not like ‘…%’ AND a.attnum > 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum
(postgres7): SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE bc.oid = i.indrelid AND ic.oid = i.indexrelid AND (i.indkey[0] = a.attnum OR i.indkey[1] = a.attnum OR i.indkey[2] = a.attnum OR i.indkey[3] = a.attnum OR i.indkey[4] = a.attnum OR i.indkey[5] = a.attnum OR i.indkey[6] = a.attnum OR i.indkey[7] = a.attnum) AND a.attrelid = bc.oid AND bc.relname = ‘signoffs’
(postgres7): SELECT d.adnum as num, d.adsrc as def from pg_attrdef d, pg_class c where d.adrelid=c.oid and c.relname=‘signoffs’ order by d.adnum
(postgres7): SELECT a.attname,t.typname,a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,a.attnum FROM pg_class c, pg_attribute a,pg_type t WHERE relkind in (‘r’,‘v’) AND (c.relname=‘signoffs’ or c.relname = lower(‘signoffs’)) and a.attname not like ‘…%’ AND a.attnum > 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum
(postgres7): SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE bc.oid = i.indrelid AND ic.oid = i.indexrelid AND (i.indkey[0] = a.attnum OR i.indkey[1] = a.attnum OR i.indkey[2] = a.attnum OR i.indkey[3] = a.attnum OR i.indkey[4] = a.attnum OR i.indkey[5] = a.attnum OR i.indkey[6] = a.attnum OR i.indkey[7] = a.attnum) AND a.attrelid = bc.oid AND bc.relname = ‘signoffs’
(postgres7): SELECT d.adnum as num, d.adsrc as def from pg_attrdef d, pg_class c where d.adrelid=c.oid and c.relname=‘signoffs’ order by d.adnum
(postgres7): SELECT a.attname,t.typname,a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,a.attnum FROM pg_class c, pg_attribute a,pg_type t WHERE relkind in (‘r’,‘v’) AND (c.relname=‘signoffs’ or c.relname = lower(‘signoffs’)) and a.attname not like ‘…%’ AND a.attnum > 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum
(postgres7): SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE bc.oid = i.indrelid AND ic.oid = i.indexrelid AND (i.indkey[0] = a.attnum OR i.indkey[1] = a.attnum OR i.indkey[2] = a.attnum OR i.indkey[3] = a.attnum OR i.indkey[4] = a.attnum OR i.indkey[5] = a.attnum OR i.indkey[6] = a.attnum OR i.indkey[7] = a.attnum) AND a.attrelid = bc.oid AND bc.relname = ‘signoffs’
(postgres7): SELECT d.adnum as num, d.adsrc as def from pg_attrdef d, pg_class c where d.adrelid=c.oid and c.relname=‘signoffs’ order by d.adnum
(postgres7): SELECT a.attname,t.typname,a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,a.attnum FROM pg_class c, pg_attribute a,pg_type t WHERE relkind in (‘r’,‘v’) AND (c.relname=‘signoffs’ or c.relname = lower(‘signoffs’)) and a.attname not like ‘…%’ AND a.attnum > 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum
(postgres7): SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE bc.oid = i.indrelid AND ic.oid = i.indexrelid AND (i.indkey[0] = a.attnum OR i.indkey[1] = a.attnum OR i.indkey[2] = a.attnum OR i.indkey[3] = a.attnum OR i.indkey[4] = a.attnum OR i.indkey[5] = a.attnum OR i.indkey[6] = a.attnum OR i.indkey[7] = a.attnum) AND a.attrelid = bc.oid AND bc.relname = ‘signoffs’
(postgres7): SELECT d.adnum as num, d.adsrc as def from pg_attrdef d, pg_class c where d.adrelid=c.oid and c.relname=‘signoffs’ order by d.adnum
(postgres7): SELECT relname FROM pg_class JOIN pg_depend ON pg_class.relfilenode=pg_depend.objid WHERE relname=‘signoffs_signoff_id_seq’ AND relkind=‘S’ AND deptype=‘i’
(postgres7): DROP INDEX signoff_symbolic
(postgres7): BEGIN
(postgres7): SELECT * INTO TEMPORARY TABLE signoffs_tmp FROM signoffs
(postgres7): DROP TABLE signoffs CASCADE
(postgres7): DROP SEQUENCE IF EXISTS signoffs_signoff_id_seq
(postgres7): CREATE TABLE signoffs ( signoff_id SERIAL, symbolic VARCHAR(32) NOT NULL, assoc_type INT8 DEFAULT 0 NOT NULL, assoc_id INT8 DEFAULT 0 NOT NULL, user_id INT8 NOT NULL, file_id INT8, file_revision INT8, date_notified TIMESTAMP, date_underway TIMESTAMP, date_completed TIMESTAMP, date_acknowledged TIMESTAMP, user_group_id INT8, PRIMARY KEY (signoff_id) )
(postgres7): INSERT INTO signoffs (signoff_id, symbolic, assoc_type, assoc_id, user_id, file_id, file_revision, date_notified, date_underway, date_completed, date_acknowledged, user_group_id) SELECT signoff_id, symbolic, assoc_type, assoc_id, user_id, file_id, file_revision, date_notified, date_underway, date_completed, date_acknowledged, user_group_id FROM signoffs_tmp
(postgres7): SELECT setval(‘signoffs_signoff_id_seq’,MAX(signoff_id)) FROM signoffs
(postgres7): DROP TABLE signoffs_tmp
(postgres7): COMMIT
about 60,000 characters omitted
(postgres7): BEGIN
(postgres7): SELECT * INTO TEMPORARY TABLE usage_stats_temporary_records_tmp FROM usage_stats_temporary_records
(postgres7): DROP TABLE usage_stats_temporary_records CASCADE
(postgres7): CREATE TABLE usage_stats_temporary_records ( assoc_id INT8 NOT NULL, assoc_type INT8 NOT NULL, day INT8 NOT NULL, metric INT8 DEFAULT 1 NOT NULL, country_id VARCHAR(2), region VARCHAR(2), city VARCHAR(255), load_id VARCHAR(255) NOT NULL, file_type SMALLINT, entry_time INT8 NOT NULL )
(postgres7): INSERT INTO usage_stats_temporary_records (assoc_id, assoc_type, day, metric, country_id, region, city, load_id, file_type, entry_time) SELECT assoc_id, assoc_type, day, metric, country_id, region, city, load_id, file_type, entry_time FROM usage_stats_temporary_records_tmp
-1: ERROR: null value in column “entry_time” violates not-null constraint
ADOConnection._Execute(INSERT INTO usage_stats_temporary_records (assoc_id, assoc_type, day, metric, country_id, region, city, load_id, file_type, entr…, false) % line 864, file: adodb.inc.php
ADOConnection.Execute(INSERT INTO usage_stats_temporary_records (assoc_id, assoc_type, day, metric, country_id, region, city, load_id, file_type, entr…) % line 452, file: Installer.inc.php
Installer.executeSQL(INSERT INTO usage_stats_temporary_records (assoc_id, assoc_type, day, metric, country_id, region, city, load_id, file_type, entr…) % line 447, file: Installer.inc.php
Installer.executeSQL(Array[7]) % line 695, file: PKPPlugin.inc.php
PKPPlugin.updateSchema(Installer::postInstall, Array[2]) % line 0, file:
(postgres7): SELECT setting_name, setting_value, setting_type FROM plugin_settings WHERE plugin_name = ? AND journal_id = ? [ (0=>‘usagestatsplugin’) (1=>‘0’) ]
-1: ERROR: current transaction is aborted, commands ignored until end of transaction block
ADOConnection._Execute(SELECT setting_name, setting_value, setting_type FROM plugin_settings WHERE plugin_name = ? AND journal_id = ?, Array[2]) % line 860, file: adodb.inc.php
ADOConnection.Execute(SELECT setting_name, setting_value, setting_type FROM plugin_settings WHERE plugin_name = ? AND journal_id = ?, Array[2]) % line 98, file: DAO.inc.php
DAO.retrieve(SELECT setting_name, setting_value, setting_type FROM plugin_settings WHERE plugin_name = ? AND journal_id = ?, Array[2]) % line 77, file: PluginSettingsDAO.inc.php
PluginSettingsDAO.getPluginSettings(0, usagestatsplugin) % line 253, file: PluginSettingsDAO.inc.php
PluginSettingsDAO.installSettings(0, usagestatsplugin, plugins/generic/usageStats/settings.xml) % line 0, file:
DB Error: ERROR: current transaction is aborted, commands ignored until end of transaction block
Stack Trace:
File: /srv/www/scholarworks.iu.edu/htdocs/ojs-2.4.7-1/classes/plugins/PluginSettingsDAO.inc.php line 77
Function: DAO->retrieve(“SELECT setting_name, setting_value, setting_type FROM plugin_set…”, Array(2))
File: /srv/www/scholarworks.iu.edu/htdocs/ojs-2.4.7-1/classes/plugins/PluginSettingsDAO.inc.php line 253
Function: PluginSettingsDAO->getPluginSettings(0"usagestatsplugin")
File: (unknown) line (unknown)
Function: PluginSettingsDAO->installSettings(0"usagestatsplugin", “plugins/generic/usageStats/settings.xml”)
File: /srv/www/scholarworks.iu.edu/htdocs/ojs-2.4.7-1/lib/pkp/classes/plugins/PKPPlugin.inc.php line 533
Function: call_user_func_array(Array(2), Array(3))
File: (unknown) line (unknown)
Function: PKPPlugin->installSiteSettings(“Installer::postInstall”, Array(2))
File: /srv/www/scholarworks.iu.edu/htdocs/ojs-2.4.7-1/lib/pkp/classes/plugins/HookRegistry.inc.php line 89
Function: call_user_func(Array(2), “Installer::postInstall”, Array(2))
File: /srv/www/scholarworks.iu.edu/htdocs/ojs-2.4.7-1/lib/pkp/classes/install/Installer.inc.php line 208
Function: HookRegistry->call(“Installer::postInstall”, Array(2))
File: /srv/www/scholarworks.iu.edu/htdocs/ojs-2.4.7-1/lib/pkp/classes/install/Installer.inc.php line 194
Function: Installer->postInstall()
File: /srv/www/scholarworks.iu.edu/htdocs/ojs-2.4.7-1/classes/install/form/UpgradeForm.inc.php line 50
Function: Installer->execute()
File: /srv/www/scholarworks.iu.edu/htdocs/ojs-2.4.7-1/lib/pkp/pages/install/PKPInstallHandler.inc.php line 114
Function: UpgradeForm->execute()
File: (unknown) line (unknown)
Function: PKPInstallHandler->installUpgrade(Array(0), Object(Request))
File: /srv/www/scholarworks.iu.edu/htdocs/ojs-2.4.7-1/lib/pkp/classes/core/PKPRouter.inc.php line 362
Function: call_user_func(Array(2), Array(0), Object(Request))
File: /srv/www/scholarworks.iu.edu/htdocs/ojs-2.4.7-1/lib/pkp/classes/core/PKPPageRouter.inc.php line 220
Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(0), False)
File: /srv/www/scholarworks.iu.edu/htdocs/ojs-2.4.7-1/lib/pkp/classes/core/Dispatcher.inc.php line 134
Function: PKPPageRouter->route(Object(Request))
File: /srv/www/scholarworks.iu.edu/htdocs/ojs-2.4.7-1/lib/pkp/classes/core/PKPApplication.inc.php line 178
Function: Dispatcher->dispatch(Object(Request))
File: /srv/www/scholarworks.iu.edu/htdocs/ojs-2.4.7-1/index.php line 64
Function: PKPApplication->execute()