Re: [BUGS] Errors on CREATE TABLE IF NOT EXISTS
Hi Robert, On 27/04/2012 20:24, Robert Haas wrote: The bottom line is that CREATE TABLE IF NOT EXISTS doesn't pretend to handle concurrency issues any better than regular old CREATE TABLE, which is to say not very well. Thanks for the thorough reply. I guessed it was something like that, but I thought it was better to report that anyway, just in case. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/ -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #6623: FATAL: terminating connection due to administrator command
The following bug has been logged on the website: Bug reference: 6623 Logged by: Mueen Akhtar Email address: mue...@chetu.com PostgreSQL version: 8.4.1 Operating system: Linux Description: Hi, We get below error unexpectedly because my application was working proper since one year and suddenly we are getting below error please advise: org.postgresql.util.PSQLException: FATAL: terminating connection due to administrator command at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1513) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1298) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:190) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:438) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:258) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186) at org.hibernate.loader.Loader.getResultSet(Loader.java:1787) at org.hibernate.loader.Loader.doQuery(Loader.java:674) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) at org.hibernate.loader.Loader.doList(Loader.java:2220) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) at org.hibernate.loader.Loader.list(Loader.java:2099) at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283) at com.chetu.carecloud.eorder.dao.daoImpl.LabOrderConnectivitiesDAOImpl.getConnectivityDetails(LabOrderConnectivitiesDAOImpl.java:34) at com.chetu.carecloud.eorder.StartEngine.startHL7GenerationProcess(StartEngine.java:66) at com.chetu.carecloud.eorder.ForwardRequest.run(LabOrderService.java:181) at java.lang.Thread.run(Thread.java:619) WARN [2012-04-30 14:18:27,612] org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 57P01 ERROR [2012-04-30 14:18:27,612] org.hibernate.util.JDBCExceptionReporter - FATAL: terminating connection due to administrator command WARN [2012-04-30 14:18:27,612] org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 08006 ERROR [2012-04-30 14:18:27,612] org.hibernate.util.JDBCExceptionReporter - An I/O error occured while sending to the backend. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #6623: FATAL: terminating connection due to administrator command
wrote: > PostgreSQL version: 8.4.1 [sigh] Please apply the security and bug fixes which have accumulated over the last two-and-a-half years: http://www.postgresql.org/support/versioning/ > we are getting below error please advise: > org.postgresql.util.PSQLException: FATAL: terminating connection > due to administrator command What do you see in the PostgreSQL server log at the time of this disconnect? -Kevin -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] Errors on CREATE TABLE IF NOT EXISTS
Excerpts from Matteo Beccati's message of lun abr 23 08:49:39 -0300 2012: > Hi, > > I've recently seen a few errors on our continuous integration system > during a test using a badly written partitioning trigger. The function > was basically checking for the existence of the partition table at every > insert and was running a CREATE TABLE IF NOT EXISTS statement in case it > was needed. What baffled me was that the function was exiting with an > ERROR, rather than succeeding with a NOTICE, e.g.: The question you were asking has already been answered, but I think it's worth pointing out that a partitioned-insert trigger that has to check whether the partition exist beforehand is a lot slower than one that doesn't have to. Our usual suggestion is to create the partitions by some other means, e.g. create a couple months worth of weekly partitions, a couple of months ahead of time, via cron. The insert trigger is then assured that the partition exists, and it can become faster by not having to check. -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs