Thread: NOTICE causing SQLException
Our DBA (which isn't that great of a DBA) changed some settings in postgresql.conf and suddenly our Java application stopped working with the following message: *** TerminalManagerError connecting to the DataBase: Something unusual has occured to cause the driver to fail. Please report this exception: Exception: java.sql.SQLException: NOTICE: Query statistics are disabled because parser, planner, or executor statistics are on. Stack Trace: java.sql.SQLException: NOTICE: Query statistics are disabled because parser, planner, or executor statistics are on. at org.postgresql.Connection.openConnection(Connection.java:274) at org.postgresql.Driver.connect(Driver.java:149) at java.sql.DriverManager.getConnection(DriverManager.java:517) at java.sql.DriverManager.getConnection(DriverManager.java:177) at immanis.database.DatabaseManager.getConnection(DatabaseManager.java:36) at immanis.database.TerminalManager.<init>(TerminalManager.java:66) at immanis.database.TerminalManager.getInstance(TerminalManager.java:81) at immanis.util.Authorizer.authorize(Authorizer.java:75) at immanis.protocol.ProtocolBase.debug(ProtocolBase.java:58) at immanis.core.Transaction.begin(Transaction.java:411) at immanis.core.Transaction.run(Transaction.java:506) at java.lang.Thread.run(Thread.java:484) End of Stack Trace ------------------------------------------------ Connecting to the DB with 'psql' produced this same 'NOTICE' message. My understanding of this stacktrace is that the JDBC driver mistook this 'NOTICE' for an error and couldn't open a connection. The backend is 7.2 and the JDBC driver is the latest 7.2 stable build. Can someone please shed me some light? Thank you very much for any help. -- []'s Daniel Serodio
On Tue, Sep 17, 2002 at 11:40:33AM -0300, Daniel Serodio wrote: > *** TerminalManagerError connecting to the DataBase: > Something unusual has occured to cause the driver to fail. Please report > this exception: Exception: java.sql.SQLException: NOTICE: Query > statistics are disabled because parser, planner, or executor statistics > are on. There's a series of statistics settings in the postgresql.conf file. They cannot all be turned on. You're probably right in thinking that this is a mistake the driver is making, because that is just a NOTICE and not an ERROR. Anyway, you can put the statistics pieces back the way they were, and SIGUP the postmaster, and you should be set. The settings you want are #show_parser_stats = false #show_planner_stats = false #show_executor_stats = false #show_query_stats = false (Those are the defaults.) If any of parser, planner, or executor are true, the query ones are unavailable. A -- ---- Andrew Sullivan 204-4141 Yonge Street Liberty RMS Toronto, Ontario Canada <andrew@libertyrms.info> M2P 2A8 +1 416 646 3304 x110
On Tue, 2002-09-17 at 11:56, Andrew Sullivan wrote: > On Tue, Sep 17, 2002 at 11:40:33AM -0300, Daniel Serodio wrote: > > > *** TerminalManagerError connecting to the DataBase: > > Something unusual has occured to cause the driver to fail. Please report > > this exception: Exception: java.sql.SQLException: NOTICE: Query > > statistics are disabled because parser, planner, or executor statistics > > are on. > > There's a series of statistics settings in the postgresql.conf file. > They cannot all be turned on. You're probably right in thinking that > this is a mistake the driver is making, because that is just a NOTICE > and not an ERROR. Anyway, you can put the statistics pieces back the > way they were, and SIGUP the postmaster, and you should be set. The > settings you want are > > #show_parser_stats = false > #show_planner_stats = false > #show_executor_stats = false > #show_query_stats = false > > (Those are the defaults.) If any of parser, planner, or executor are > true, the query ones are unavailable. Hi, thanks for the quick reply. That's what he (the DBA) did to get the system up again, after I told him to undo whatever changes he had done to postgresql.conf. However, I think the JDBC driver really should handle NOTICEs more gracefully. -- []'s Daniel Serodio
On Tue, Sep 17, 2002 at 11:59:42AM -0300, Daniel Serodio wrote: > to postgresql.conf. However, I think the JDBC driver really should > handle NOTICEs more gracefully. I think it normally does. I've never run into such a problem with NOTICE. A -- ---- Andrew Sullivan 204-4141 Yonge Street Liberty RMS Toronto, Ontario Canada <andrew@libertyrms.info> M2P 2A8 +1 416 646 3304 x110
Daniel, There was a bug in the way the 7.2 driver handled notices under some circumstances. This should be fixed in the 7.3 driver. Can you try the latest driver build from jdbc.postgresql.org to verify that the code changes fix the problem in your case? thanks, --Barry Daniel Serodio wrote: > On Tue, 2002-09-17 at 11:56, Andrew Sullivan wrote: > >>On Tue, Sep 17, 2002 at 11:40:33AM -0300, Daniel Serodio wrote: >> >> >>>*** TerminalManagerError connecting to the DataBase: >>>Something unusual has occured to cause the driver to fail. Please report >>>this exception: Exception: java.sql.SQLException: NOTICE: Query >>>statistics are disabled because parser, planner, or executor statistics >>>are on. >> >>There's a series of statistics settings in the postgresql.conf file. >>They cannot all be turned on. You're probably right in thinking that >>this is a mistake the driver is making, because that is just a NOTICE >>and not an ERROR. Anyway, you can put the statistics pieces back the >>way they were, and SIGUP the postmaster, and you should be set. The >>settings you want are >> >>#show_parser_stats = false >>#show_planner_stats = false >>#show_executor_stats = false >>#show_query_stats = false >> >>(Those are the defaults.) If any of parser, planner, or executor are >>true, the query ones are unavailable. > > > Hi, thanks for the quick reply. That's what he (the DBA) did to get the > system up again, after I told him to undo whatever changes he had done > to postgresql.conf. However, I think the JDBC driver really should > handle NOTICEs more gracefully. >