Search Postgresql Archives

Re: migration problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PJ wrote:

($_SERVER["DOCUMENT_ROOT"]...... and all that is well. However, there seems to be a problem with the sql code which was done by another party. There is a function "checkuser" which is invoked upon login from index.php. The instruction is: checkuser(array(0,1,2,3,4,5,6));...... and there it stops.

That function hits the database repeatedly. If the problem is in fact with a database query that it's generating you need to determine which one. You could step through the function with a PHP debugger or just insert log/printing statements in the function so you can see its progress.

Alternately, run the problem checkuser() function then in psql run:

  select * from pg_stat_activity;

and see if there are any long-running queries in there that correspond to SQL generated by the checkuser() call.

Once you know which part of the function is causing a problem, you can perhaps discover something useful. If you track it down to a particular query that the function is generating, and you can't figure out what's wrong by looking at the query, you can try running it with EXPLAIN in psql.


--
Craig Ringer


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux