Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8674605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:45:00+00:00 2026-06-12T19:45:00+00:00

I have an application in migrating to MySQL and PostgreSQL and I both have

  • 0

I have an application in migrating to MySQL and PostgreSQL and I both have different behaviors in the allocation of data.

By analyzing the database created in Postgres, I realized that the numbering of ID’s created in each table are not being reset in change for another table. For example, it was set in the registers 3 ‘Table1’ and counting the ID 1 to 3. When inserted into an object of another class in another table, the ID should be started for that table, but it follows the sequence of previous and when the object is persisted in ‘table2’ instead his first start with the ID continues to count from 4. I also noticed some changes in Mysql as the ‘false’ field ‘boolean’ is preenchdio with ‘0 ‘in Postgres is filled with’ false ‘.

I updated the JDBC but the problem continues. I think maybe there should be some configuration of ‘mapping’ in the field, but not sure.

My DataSource is thus:

environments {
development {
    dataSource {

        dbCreate = "update" // one of 'create', 'create-drop', 'update', 'validate', ''

    url = "jdbc:postgresql://localhost:5432/app"
        driverClassName = "org.postgresql.Driver"
        dialect = org.hibernate.dialect.PostgreSQLDialect
        //url = "jdbc:mysql://localhost:3306/app"
        username = "app"
        password = "app123"

    }
}
test {
    dataSource {
        dbCreate = "update"
        url = "jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000"
        username = "sa"
        password = ""
    }
}
production {
    dataSource {
        dbCreate = "update"
        url = "jdbc:postgresql://localhost:5432/app"
        driverClassName = "org.postgresql.Driver"
        username = "postgres"


        pooled = true
        properties {
           maxActive = -1
           minEvictableIdleTimeMillis=1800000
           timeBetweenEvictionRunsMillis=1800000
           numTestsPerEvictionRun=3
           testOnBorrow=true
           testWhileIdle=true
           testOnReturn=true
           validationQuery="SELECT 1"
        }
    }
}

}

You can follow the same pattern as in Mysql Postgres?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T19:45:01+00:00Added an answer on June 12, 2026 at 7:45 pm

    Hibernate creates a single sequence for all tables in both Postgres and Oracle, but it’s easy to create a single sequence per table. See this solution: http://grails.1312388.n4.nabble.com/One-hibernate-sequence-is-used-for-all-Postgres-tables-td1351722.html#a1351725

    To use the custom dialect, create the class in src/groovy or src/java. Use whatever package and class name you want. To register it in Grails, set the dialect property in the dataSource block in DataSource.groovy, e.g.

    dataSource {
       pooled = true
       dialect = com.foo.bar.MyDialect
       driverClassName = ...
       username = ...
       password = ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a MySQL database that I am migrating to SQL Server. The application
I have created a new application using Entity Framework 4.3 database migrations. The migrations
I have Core Data application and I have been migrating (upgrading) the core data
I have a 5k line MySQL database structure from a legacy application and need
I have a mysql question. I have an application which I am migrating to
I'm in the process of migrating my application's database from MySQL to NoSQL(MongoDB). However,
I have an rails application with an mySQL database and not the permission to
I have a RAILS 3.x application developed locally using MySQL which has data which
I am migrating application from JSF1.2/MyFaces+Facelets TO JSF2.1/MyFaces. I have following template which used
I have application with needs to have access to some sensitive data(in this case

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.