Markus,
* Markus Schulz (msc@antzsystem.de) wrote:
> as you can see the query runs fine.
> I can run this query from a bash-psql-while-loop/jdbc-cli-tool
> endless without any problems.
> so far so good.
[...]
> JBoss EAP 5.1.2 with connection pooling and xa-datasource/two-phase-commits
> (transactions on multiple datasources needed)
> *and* *<prepared-statement-cache-size>1000</prepared-statement-cache-size>*
>
> i can run the query four times with good performance and after that postgresql
> starts with the strange lseek() behavior.
It sounds like your bash script and JBoss are doing something different.
Would it be possible for you to turn on log_statements = 'all' in PG,
see what's different, and then update the bash/psql script to do exactly
what JBoss does, and see if you can reproduce it that way?
It certainly looks like a PG bug, but it'd be a lot easier to debug with
a simple, well-defined test case which shows the failure.
Thanks!
Stephen