I've a readonly database (PostgresSQL hot standby database), and I run reports over this database without issues. But when I execute using the API, very same report, with very same parameters, I get an error that I can't create temp tables in a readonly database (!!!).
Is there a difference on the way the SQL command is executed in ART when running via API? Like "preparedStatements" or "temporary tables", etc?
I don't think there's a difference. The stacktrace attached is reporting an error from art.runreport.RunReportController, which seems to indicate the report is being run from the browser?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"org.postgresql.util.PSQLException: ERROR: cannot create temporary or unlogged relations during recovery"
I explain: "during recovery" is just because this is a slave server (hot standby).
I've checked the ReportRunner code, and seems that some report types requires Scrollable Cursors/ResultSets - I'm not shure that PostgreSQL provide this feature when consuming from a hot standby server.
Would this affect? And why when running via Art web UI this error won't happen? Would be the output format related (I'm using json as reportFormat, and I've used json also in Art web UI)?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Would you mind to guide me how can I enable a DEBUG logger? I'm not confortable with logging configuration files at all (besides working with Java since 1995, I never completely understood how this logging configurations really work - may be I need to read "Java logging for Dummies" kkkk !!!)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Not to worry. Actually ART has an option to add/remove loggers from the UI. Use the Configure | Loggers menu. Add a DEBUG logger for art.runreport.ReportRunner. You'll then need to edit the logger to OFF when you're done testing so that it doesn't fill your logs.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've a readonly database (PostgresSQL hot standby database), and I run reports over this database without issues. But when I execute using the API, very same report, with very same parameters, I get an error that I can't create temp tables in a readonly database (!!!).
Is there a difference on the way the SQL command is executed in ART when running via API? Like "preparedStatements" or "temporary tables", etc?
Thanks,
Edson
I don't think there's a difference. The stacktrace attached is reporting an error from art.runreport.RunReportController, which seems to indicate the report is being run from the browser?
It's a Java program simulating a GET request using Apache Commons HTTP API.
OK. I guess it's the same code that runs then. Could you translate the exception message to english?
Of course, I'm so sorry.
Message is
"org.postgresql.util.PSQLException: ERROR: cannot create temporary or unlogged relations during recovery"
I explain: "during recovery" is just because this is a slave server (hot standby).
I've checked the ReportRunner code, and seems that some report types requires Scrollable Cursors/ResultSets - I'm not shure that PostgreSQL provide this feature when consuming from a hot standby server.
Would this affect? And why when running via Art web UI this error won't happen? Would be the output format related (I'm using json as reportFormat, and I've used json also in Art web UI)?
Not sure why the difference. You could add a DEBUG logger for the ReportRunner class and see if there's any difference.
Would you mind to guide me how can I enable a DEBUG logger? I'm not confortable with logging configuration files at all (besides working with Java since 1995, I never completely understood how this logging configurations really work - may be I need to read "Java logging for Dummies" kkkk !!!)
Hi,
Not to worry. Actually ART has an option to add/remove loggers from the UI. Use the Configure | Loggers menu. Add a DEBUG logger for art.runreport.ReportRunner. You'll then need to edit the logger to OFF when you're done testing so that it doesn't fill your logs.
Log attached.
I think I've found the problem, isn't ART! Actually, this database in particular has a unlogged table "reporting.filtro_6".
I'm so sorry for disturbing!
Thanks for teaching me how to debug this kind of error! I hope I can use this knowledge in future to help others here :-)
Ah! That's really great to hear. Happy that the issue has been resolved.