jvelo / mayocat-shop

[RETIRED] Open source e-commerce and marketplaces made simple on the JVM
Other
173 stars 116 forks source link

'must be superuser to create an operator class' #232

Open neilhanyd opened 9 years ago

neilhanyd commented 9 years ago

When I use postgresql on AWS RDS and run migrate.sh on, the following error happens,

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0 Exception in thread "main" com.googlecode.flyway.core.api.FlywayException: Migration of schema "public" to version 0120.0002 failed! Changes successfully rolled back. at com.googlecode.flyway.core.command.DbMigrate.applyMigration(DbMigrate.java:266) at com.googlecode.flyway.core.command.DbMigrate.access$700(DbMigrate.java:47) at com.googlecode.flyway.core.command.DbMigrate$1.doInTransaction(DbMigrate.java:189) at com.googlecode.flyway.core.command.DbMigrate$1.doInTransaction(DbMigrate.java:138) at com.googlecode.flyway.core.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:56) at com.googlecode.flyway.core.command.DbMigrate.migrate(DbMigrate.java:137) at com.googlecode.flyway.core.Flyway$1.execute(Flyway.java:872) at com.googlecode.flyway.core.Flyway$1.execute(Flyway.java:819) at com.googlecode.flyway.core.Flyway.execute(Flyway.java:1200) at com.googlecode.flyway.core.Flyway.migrate(Flyway.java:819) at org.mayocat.flyway.FlywayMigrateCommand.run(FlywayMigrateCommand.java:59) at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:76) at io.dropwizard.cli.Cli.run(Cli.java:70) at io.dropwizard.Application.run(Application.java:72) at org.mayocat.shop.application.MayocatShopService.main(MayocatShopService.java:61) Caused by: org.postgresql.util.PSQLException: ERROR: must be superuser to create an operator class at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:405) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:397) at com.googlecode.flyway.core.dbsupport.JdbcTemplate.executeStatement(JdbcTemplate.java:230) INFO [2015-01-21 22:57:04,156] com.googlecode.flyway.core.command.DbMigrate: Current version of schema "public": 0120.0001 at com.googlecode.flyway.core.dbsupport.SqlScript.execute(SqlScript.java:89) at com.googlecode.flyway.core.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:72) at com.googlecode.flyway.core.command.DbMigrate$2.doInTransaction(DbMigrate.java:252) at com.googlecode.flyway.core.command.DbMigrate$2.doInTransaction(DbMigrate.java:250) INFO [2015-01-21 22:57:04,174] com.googlecode.flyway.core.command.DbMigrate: Migrating schema "public" to version 0120.0002 at com.googlecode.flyway.core.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:56) at com.googlecode.flyway.core.command.DbMigrate.applyMigration(DbMigrate.java:250) ... 14 more

jvelo commented 9 years ago

Hi, the operator class creation is needed to be able to index arrays of UUID. Theoritically mayocat could function without this index, but with the risk of performance issue when using such lists. Right now such arrays are used for example for managing the list of products featured on the home page.

jvelo commented 9 years ago

See the migration in question : https://github.com/mayocat/mayocat-shop/blob/master/platform/store/rdbms/migrations/src/main/resources/mayoapp/migrations/V0120_0002__add_entity_lists.sql