Devrim GUNDUZ <devrim(at)gunduz(dot)org> writes:
> I've changed statement_timeout value from 5 to 0; restarted PostgreSQL and
> all commands are running now... So, what could be the problem with
> statement_timeout?
Apparently you need a timeout longer than 5 milliseconds.
Note that the first few queries executed by a backend will take longer
than "usual" because of the overhead of populating the catalog caches.
regards, tom lane