|
From: Koichi S. <koi...@gm...> - 2013-10-04 02:33:11
|
Sorry, I'm not familiar with Hibernate but JDBC does support DISTRIBUTE BY REPLICATION. You can issue CREATE TABLE through general jdbc apps, or you can issue ALTER TABLE to change distributed table into replicated table outside Hibernate, through psql. There's no influence in other query statement. Regards; --- Koichi Suzuki 2013/10/4 Anson Abraham <ans...@gm...> > So I migrated a pg database (9.1) to postgres-xc 1.1. Required me to > essentially apply the Distribute By Replication to most of the tables. But > doing so, apparently this app threw out an error: > > Unable to upgrade schema to latest version. > org.hibernate.exception.GenericJDBCException: ResultSet not positioned properly, perhaps you need to call next. > at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54) > at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125) > at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110) > at org.hibernate.engine.jdbc.internal.proxy.AbstractResultSetProxyHandler.continueInvocation(AbstractResultSetProxyHandler.java:108) > at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81) > at $Proxy10.getInt(Unknown Source) > at com.cloudera.enterprise.dbutil.DbUtil.getSchemaVersion(DbUtil.java:212) > at com.cloudera.enterprise.dbutil.DbUtil$1SchemaVersionWork.execute(DbUtil.java:159) > at org.hibernate.jdbc.WorkExecutor.executeWork(WorkExecutor.java:54) > at org.hibernate.internal.SessionImpl$2.accept(SessionImpl.java:1937) > at org.hibernate.internal.SessionImpl$2.accept(SessionImpl.java:1934) > at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:211) > at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:1955) > at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:1941) > at com.cloudera.enterprise.dbutil.DbUtil.getSchemaVersion(DbUtil.java:171) > at com.cloudera.enterprise.dbutil.DbUtil.upgradeSchema(DbUtil.java:333) > at com.cloudera.cmon.FhDatabaseManager.initialize(FhDatabaseManager.java:68) > at com.cloudera.cmon.firehose.Main.main(Main.java:339) > Caused by: org.postgresql.util.PSQLException: ResultSet not positioned properly, perhaps you need to call next. > at org.postgresql.jdbc2.AbstractJdbc2ResultSet.checkResultSet(AbstractJdbc2ResultSet.java:2695) > at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getInt(AbstractJdbc2ResultSet.java:1992) > at com.mchange.v2.c3p0.impl.NewProxyResultSet.getInt(NewProxyResultSet.java:2547) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.hibernate.engine.jdbc.internal.proxy.AbstractResultSetProxyHandler.continueInvocation(AbstractResultSetProxyHandler.java:104) > ... > > > So I'm assuming hibernate does not support Distribute by Replication? Is that so, or did I not need to apply distribute by replication, though the table has a PK w/ is also reference as FK from another table? If not, is there a hack to get around this, w/o having to recompile hibernate objects? > > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most > from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk > _______________________________________________ > Postgres-xc-general mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-general > > |