-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dump of postgreSql database: relation "public.null" does not exist #36
Comments
Please enable logging, re-run the migrator tool and attach a complete log file. Logging can be enabled by editing conf/log4j.properties and commenting out this line: log4j.logger.com.nuodb.migrator.jdbc.connection=noneThe log file can be found in your /tmp directory. The log filename is nuodb-migrator.log Best Regards, |
Here is the log file: |
Hello Hugobento, 23-05-2014 09:44:23 (TRACE) (com.nuodb.migrator.jdbc.connection.SimpleQueryLogger.log(SimpleQueryLogger.java:46)) - WITH SEQUENCES AS (SELECT N.NSPNAME AS SCHEMA_NAME, C.RELNAME AS TABLE_NAME, A.ATTNAME AS COLUMN_NAME, SUBSTRING(PG_GET_EXPR(DEF.ADBIN, DEF.ADRELID) FROM 'nextval(''(.)''::.)') AS SEQUENCE_NAME FROM PG_CATALOG.PG_NAMESPACE N JOIN PG_CATALOG.PG_CLASS C ON (C.RELNAMESPACE = N.OID) JOIN PG_CATALOG.PG_ATTRIBUTE A ON (A.ATTRELID=C.OID) LEFT JOIN PG_CATALOG.PG_ATTRDEF DEF ON (A.ATTRELID=DEF.ADRELID AND A.ATTNUM = DEF.ADNUM) WHERE A.ATTNUM>0 AND NOT A.ATTISDROPPED AND ADSRC IS NOT NULL AND SUBSTRING(ADSRC FROM 0 FOR 9)='nextval(') SELECT * FROM SEQUENCES WHERE SCHEMA_NAME='public' First, it was selecting sequences from the system metadata tables. This sql returned something that the migrator interpreted as a sequence named NULL. It then built the SQL statement "select * from public.null". Not sure if this is caused by something in postgresql "version 8.4". Can you try running the migrator tool DUMP with one additional command option: Also, one unrelated suggestion. the command option: Best Regards, The information contained in this email is confidential and proprietary and intended for the sole use of the intended recipient. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this email in error, please notify the sender and delete all copies. |
Hi again, Trying that an error comes up of
suggestions? |
Hi hugobento;
|
Java heap space error again. Log file here Is there any other way I can migrate a postgres database into a NuoDB database? Or dump different kind of files...I mean this method of csv dumps seems to consume a lot of memory. The latest try was going well, I had already some csv files (11 to be exact) but I guess it chocked on a larger table. |
Just a further explanation, the table where it breaks has (in this case) 4,5 million rows. It can have 10 times this amount in production environment. |
Hi Hugobento, The default nuodb-migrator script is not optimally tuned for very large databases in the bin/nuodb-migrator script that you are running, change the variable MAX_HEAP_SIZE: There is also a dump command option: --threads=value Try dumping just this one very large table, using the dump command option: NOTE: if you have constraints on this table referencing other tables in your database, you may have to use the dump command option: Best Regards, The information contained in this email is confidential and proprietary and intended for the sole use of the intended recipient. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this email in error, please notify the sender and delete all copies. |
Hi Hugobento, jmap -dump:format=b,file=/tmp/dump.hprof where is the "process id" for the migrator-tool process that you are running. Best Regards, The information contained in this email is confidential and proprietary and intended for the sole use of the intended recipient. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this email in error, please notify the sender and delete all copies. |
Hello, Thanks for your response/availability. I will try to do as you ask but with one restraint, I do not have 10G of memory on this machine available... One suggestion (from an outsider point of view of course) would be to try to handle this type of process with streaming capabilities or restraining within a buffer size. I'll keep you posted. Regards. |
Same result, I was only able to go up to 2G of memory. Regards. |
Hi Hugobento, By default the PostgreSQL driver collects all the results for the query at once. For a large database, this can result in the issue you are seeing. Our engineer has provided a fix that will override this driver default behavior. This fix is available for download, along with instructions, here: Best Regards, The information contained in this email is confidential and proprietary and intended for the sole use of the intended recipient. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this email in error, please notify the sender and delete all copies. |
Hello msullivan, I will test this around. Anyhow, I was checking the code that was altered and I have to tell you I'm a bit worried about some code, specifically about this I'll test it and get back to you. Regards. |
Hello Hugobento Did this new version of the NuoDB Migrator tool solve the issue? Best Regards, The information contained in this email is confidential and proprietary and intended for the sole use of the intended recipient. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this email in error, please notify the sender and delete all copies. |
Hello. Only today had the chance to test it out. |
Hello Hugobento, Best Regards, The information contained in this email is confidential and proprietary and intended for the sole use of the intended recipient. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this email in error, please notify the sender and delete all copies. |
Hello Hugobento, Best Regards, The information contained in this email is confidential and proprietary and intended for the sole use of the intended recipient. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this email in error, please notify the sender and delete all copies. |
Hello Hugobento, The information contained in this email is confidential and proprietary and intended for the sole use of the intended recipient. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this email in error, please notify the sender and delete all copies. |
Hello Hugobento, Best Regards, The information contained in this email is confidential and proprietary and intended for the sole use of the intended recipient. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this email in error, please notify the sender and delete all copies. |
I am sorry for the delay, The script for the creation of the table is available here: |
Hello Hugobento, First, i want to make sure you are using the most recent version of the migrator tool. This most recent version of the migrator-tool has fixed the issue you were having initially with migrating sequences in PostgreSQL verison 8.x. You can download and build this migrator-tool version from GitHub: Next, remove the option "--meta.data.sequence=false" from your DUMP command. This table, daily_movements, has a column defined as SERIAL. Therefore, you need to migrate sequences to migrate this table. I was able to recreate your issue and I was able to verify that removing this DUMP command option will fix the issue for you. Feel free to email [email protected] for any other issues you may have with the nuodb-migrator tool or NuoDB. Best Regards, The information contained in this email is confidential and proprietary and intended for the sole use of the intended recipient. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this email in error, please notify the sender and delete all copies. |
Hello Madolyn, |
I am trying to run some tests on NuoDB and started by migrating a Database I already had on Postgres on the server. Here are the steps I followed:
./nuodb-migrator dump --source.driver=org.postgresql.Driver --source.url=jdbc:postgresql://localhost/db_name --source.username=db_user --source.password=password --source.schema=public --output.path=/tmp/nuo_db_test.cat
This gave me the error:
Execution failed com.nuodb.migrator.utils.ReflectionException: Failed to invoke public abstract java.sql.ResultSet java.sql.Statement.executeQuery(java.lang.String) throws java.sql.SQLException method on object of org.apache.commons.dbcp.DelegatingStatement class
(...)Caused by: org.postgresql.util.PSQLException: ERROR: relation "public.null" does not exist Position: 15
Of this I took the part of "public.null does not exist" but I don't have a table called null as you can imagine.
What can be wrong?
The text was updated successfully, but these errors were encountered: