That's a very vague question, but you can trace exactly what is happening by issuing
SET log_statement = 'all';
Ideally at the session level by your application, but can also set it at the database and user level. If all else fails, set it globally (i.e. postgresql.conf). Turn it off again as soon as possible, it will make your logs extremely verbose. But you can track exactly what your application is doing.
Cheers,
Greg