Author: overlordq
Description:
If using a Postgres back end when you go to export any pages it returns corrupted XML with the following at the end:
<b>Warning</b>: pg_query(): 50 is not a valid PostgreSQL link resource in <b>/var/www/mysite/wiki/includes/db/DatabasePostgres.php</b> on line <b>582</b><br />
<br />
<b>Warning</b>: pg_last_error() [<a href='function.pg-last-error'>function.pg-last-error</a>]: No PostgreSQL link opened yet in <b>/var/www/mysite/wiki/includes/db/DatabasePostgres.php</b> on line <b>666</b><br />
<br />
<b>Warning</b>: pg_last_error() [<a href='function.pg-last-error'>function.pg-last-error</a>]: No PostgreSQL link opened yet in <b>/var/www/mysite/wiki/includes/db/DatabasePostgres.php</b> on line <b>673</b><br />
<br />
<b>Warning</b>: pg_query(): 50 is not a valid PostgreSQL link resource in <b>/var/www/mysite/wiki/includes/db/DatabasePostgres.php</b> on line <b>582</b><br />
<br />
<b>Warning</b>: pg_last_error() [<a href='function.pg-last-error'>function.pg-last-error</a>]: No PostgreSQL link opened yet in <b>/var/www/mysite/wiki/includes/db/DatabasePostgres.php</b> on line <b>666</b><br />
<br />
<b>Warning</b>: pg_last_error() [<a href='function.pg-last-error'>function.pg-last-error</a>]: No PostgreSQL link opened yet in <b>/var/www/mysite/wiki/includes/db/DatabasePostgres.php</b> on line <b>673</b><br />
From what I can tell this is error is generated when the job queue is tried to run:
/wiki/index.php?title=Special:Export&action=submit Exception from line 1041 of /var/www/mysite/wiki/includes/db/DatabasePostgres.php: A database error has occurred
Query: SELECT * FROM job WHERE job_id >= 0 ORDER BY job_id LIMIT 1
Function: Job::pop
Error: 0
SQL ERROR (ignored):
commenting out $lb->closeAll(); on line 275 of SpecialExport fixes this error, but as I have no clue of the LoadBalancer magic I don't know what effects this cause.
Version: 1.16.x
Severity: major