-
-
Notifications
You must be signed in to change notification settings - Fork 555
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
Converting a mysql db used through a dedicated server? (akonadi) #933
Comments
The latest error you had is promising: it seems like pgloader was able to connect to the source database and began working on it. Can you try again with |
Using a KRecipes db which is much smaller, served by the central mysql server but gives the same error (and which contains nothing I couldn't share). I tried varying the rows prefetch but it doesn't seem to have any effect (not even on the memory use reported by the shell if I dial it way back to 10 rows).
|
Which version of pgloader are you using? It might be old enough (pre 3.6.x times) that upgrading or using a fresh compile from source is going to make a difference here? |
On Sunday April 14 2019 12:05:18 Dimitri Fontaine wrote:
Which version of pgloader are you using? It might be old enough (pre 3.6.x times) that upgrading or using a fresh compile from source is going to make a difference here?
Hmmm, 3.5.2, installed from the postgresql.org apt archives for Ubuntu 14.04 .
I did try building from source before adding that repository, which failed with errors that were a little too discouraging to dive in and understand. I noticed that adding that repo and installing pgloader also gave me updates for sbcl and a number of other things so I'll give it another try (which appeared to be hanging without any apparent CPU activity and then continued minutes later).
|
On Sunday April 14 2019 12:05:18 Dimitri Fontaine wrote:
Which version of pgloader are you using? It might be old enough (pre 3.6.x times) that upgrading or using a fresh compile from source is going to make a difference here?
Bummer:
```
[package cl-postgres-oid]..................;
; caught ERROR:
; READ error during COMPILE-FILE:
;
; The symbol "HOST-ENT-ADDRESS-TYPE" is not external in the SB-BSD-SOCKETS package.
;
; Line: 109, Column: 60, File-Position: 4834
;
; Stream: #<SB-SYS:FD-STREAM
; for "file /home/bertin/work/src/Scratch/pgloader-git/build/quicklisp/dists/quicklisp/software/postmodern-20190307-git/cl-postgres/public.lisp"
; {10073A4F43}>
debugger invoked on a UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread
#<THREAD "main thread" RUNNING {10039C73B3}>:
COMPILE-FILE-ERROR while
compiling #<CL-SOURCE-FILE "cl-postgres" "cl-postgres" "public">
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [RETRY ] Retry
compiling #<CL-SOURCE-FILE "cl-postgres" "cl-postgres" "public">.
1: [ACCEPT ] Continue, treating
compiling #<CL-SOURCE-FILE "cl-postgres" "cl-postgres" "public">
as having been successful.
2: Retry ASDF operation.
3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
configuration.
4: [ABORT ] Give up on "pgloader"
5: [CONTINUE ] Ignore runtime option --eval "(ql:quickload \"pgloader\")".
6: Skip rest of --eval and --load options.
7: Skip to toplevel READ/EVAL/PRINT loop.
8: [EXIT ] Exit SBCL (calling #'EXIT, killing the process).
(UIOP/LISP-BUILD:CHECK-LISP-COMPILE-RESULTS NIL T T "~/asdf-action::format-action/" ((#<ASDF/LISP-ACTION:COMPILE-OP > . #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cl-postgres" "cl-postgres" "public">)))
```
|
Looks like you're trying to compile with a pretty-old SBCL version now. Which version is this? |
1.2.4 (1.2.4-2.pgdg14.04+1 to be exact); also installed from the postgresql repo.
|
Retrying with sbcl 1.5.1 from sbcl.org I get another undefined error:
```
[package pgloader.user-symbols]...................
................................................;
; caught ERROR:
; READ error during COMPILE-FILE:
;
; Symbol "CLOSE-MEMO" not found in the DB3 package.
;
; Line: 26, Column: 17, File-Position: 816
;
; Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/bertin/work/src/Scratch/pgloader-git/src/sources/db3/db3-schema.lisp" {100B6212D3}>
debugger invoked on a UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread
#<THREAD "main thread" RUNNING {10005385B3}>:
COMPILE-FILE-ERROR while
compiling #<CL-SOURCE-FILE "pgloader" "src" "sources" "db3" "db3-schema">
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
```
Does that mean my host's libdb install is too old (6.0.19)?
R.
|
Same thing when trying on Mac with sbcl 1.5.0 and db 6.2 :
```
[package pgloader.user-symbols]...................
................................................;
; caught ERROR:
; READ error during COMPILE-FILE:
;
; Symbol "CLOSE-MEMO" not found in the DB3 package.
;
; Line: 26, Column: 17, File-Position: 816
;
; Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /Volumes/Debian/Users/bertin/work/src/new/pgloader/src/sources/db3/db3-schema.lisp" {1009EB6923}>
debugger invoked on a UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread
#<THREAD "main thread" RUNNING {10005C85B3}>:
COMPILE-FILE-ERROR while
compiling #<CL-SOURCE-FILE "pgloader" "src" "sources" "db3" "db3-schema">
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [RETRY ] Retry
compiling #<CL-SOURCE-FILE "pgloader" "src" "sources" "db3" "db3-schema">.
1: [ACCEPT ] Continue, treating
compiling #<CL-SOURCE-FILE "pgloader" "src" "sources" "db3" "db3-schema">
as having been successful.
2: Retry ASDF operation.
3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
configuration.
4: Retry ASDF operation.
5: Retry ASDF operation after resetting the
configuration.
6: [ABORT ] Give up on "pgloader"
7: [CONTINUE ] Ignore runtime option --eval "(ql:quickload \"pgloader\")".
8: Skip rest of --eval and --load options.
9: Skip to toplevel READ/EVAL/PRINT loop.
10: [EXIT ] Exit SBCL (calling #'EXIT, killing the process).
(UIOP/LISP-BUILD:CHECK-LISP-COMPILE-RESULTS NIL T T "~/asdf-action::format-action/" ((#<ASDF/LISP-ACTION:COMPILE-OP > . #<ASDF/LISP-ACTION:CL-SOURCE-FILE "pgloader" "src" "sources" "db3" "db3-schema">)))
source: (ERROR 'COMPILE-FILE-ERROR :CONTEXT-FORMAT CONTEXT-FORMAT
:CONTEXT-ARGUMENTS CONTEXT-ARGUMENTS)
0] 10
;
; compilation unit aborted
; caught 2 fatal ERROR conditions
; caught 1 ERROR condition
```
|
That last error |
I just made changes in cl-db3 (a companion library used by pgloader) that are not shipped yet in Quicklisp.
Will those be pulled in automatically or do I have to install the library myself first?
|
On Wednesday April 17 2019 04:50:26 Dimitri Fontaine wrote:
That last error `Symbol "CLOSE-MEMO" not found in the DB3 package` is because I just made changes in cl-db3 (a companion library used by
I tried to copy the cl-db3 files from your git repo into `pgloader-git/build/quicklisp/dists/quicklisp/software/cl-db3-20150302-git` but that gives another error:
```
[package pgloader.user-symbols]...................
.................................................
debugger invoked on a SIMPLE-ERROR in thread
#<THREAD "main thread" RUNNING {10005385B3}>:
attempt to redefine the STRUCTURE-OBJECT class DB3-FIELD incompatibly with
the current definition
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE ] Use the new definition of DB3-FIELD,
invalidating already-loaded code and
instances.
1: [RECKLESSLY-CONTINUE ] Use the new definition of DB3-FIELD as if
it were compatible, allowing old accessors
to use new instances and allowing new
accessors to use old instances.
2: [TRY-RECOMPILING ] Recompile db3-cast-rules and try loading it again
3: [RETRY ] Retry loading FASL for
#<CL-SOURCE-FILE "pgloader" "src" "sources" "db3" "db3-cast-rules">.
4: [ACCEPT ] Continue, treating loading FASL for
#<CL-SOURCE-FILE "pgloader" "src" "sources" "db3" "db3-cast-rules">
as having been successful.
5: Retry ASDF operation.
6: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
configuration.
7: Retry ASDF operation.
8: Retry ASDF operation after resetting the
configuration.
9: [ABORT ] Give up on "pgloader"
10: Ignore runtime option --eval "(ql:quickload \"pgloader\")".
11: Skip rest of --eval and --load options.
12: Skip to toplevel READ/EVAL/PRINT loop.
13: [EXIT ] Exit SBCL (calling #'EXIT, killing the process).
(SB-KERNEL::%REDEFINE-DEFSTRUCT #<SB-KERNEL:STRUCTURE-CLASSOID DB3-FIELD> #<SB-KERNEL:LAYOUT for DB3-FIELD {505AD903}> #<SB-KERNEL:LAYOUT for DB3-FIELD, INVALID=:UNINITIALIZED {504F6083}>)
```
I tried option `2` and then the build apparently completed successfully.
I then got loads of output from the import command, ending with:
```
pgloader --debug -v --with "prefetch rows = 1000000" ***@***.***/Krecipes postgresql:///Krecipes
2019-04-18T11:22:41.193000+02:00 SQL CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON krecipes.recipes FOR EACH ROW EXECUTE PROCEDURE krecipes.on_update_current_timestamp_recipes()
2019-04-18T11:22:41.193000+02:00 NOTICE ALTER DATABASE Krecipes SET search_path TO public, krecipes;
2019-04-18T11:22:41.194000+02:00 ERROR PostgreSQL Database error 3D000: database "krecipes" does not exist
QUERY: ALTER DATABASE Krecipes SET search_path TO public, krecipes;
2019-04-18T11:22:41.195000+02:00 LOG report summary reset
table name errors read imported bytes total time read write
------------------------------ --------- --------- --------- --------- -------------- --------- ---------
fetch meta data 0 46 46 0.830s
Create Schemas 0 0 0 0.061s
Create SQL Types 0 0 0 0.035s
Create tables 0 42 42 0.360s
Set Table OIDs 0 21 21 0.037s
------------------------------ --------- --------- --------- --------- -------------- --------- ---------
krecipes.authors 0 25 25 0.5 kB 0.229s 0.228s
krecipes.author_list 0 34 34 0.2 kB 0.230s 0.222s 0.003s
krecipes.categories 0 13 13 0.2 kB 0.037s 0.014s
krecipes.category_list 0 78 78 0.4 kB 0.043s 0.026s
krecipes.db_info 0 1 1 0.0 kB 0.079s 0.014s
krecipes.ingredient_groups 0 10 10 0.1 kB 0.114s 0.017s
krecipes.ingredients 0 553 553 9.7 kB 0.100s 0.053s 0.006s
krecipes.ingredient_list 0 298 298 7.4 kB 0.173s 0.058s 0.014s
krecipes.ingredient_info 0 19529 19529 263.1 kB 0.792s 0.788s 0.166s
krecipes.ingredient_weights 0 755 755 15.7 kB 0.223s 0.069s 0.014s
krecipes.prep_method_list 0 46 46 0.4 kB 0.193s 0.029s 0.008s
krecipes.rating_criteria 0 5 5 0.1 kB 0.219s 0.014s
krecipes.recipes 0 32 32 92.1 kB 0.282s 0.046s 0.025s
krecipes.units_conversion 0 158 158 1.9 kB 0.273s 0.017s
krecipes.yield_types 0 9 9 0.1 kB 0.281s 0.007s
krecipes.ingredient_properties 0 45 45 0.7 kB 0.012s 0.009s 0.001s
krecipes.prep_methods 0 34 34 0.4 kB 0.011s 0.009s
krecipes.ratings 0 2 2 0.1 kB 0.035s 0.011s
krecipes.rating_criterion_list 0 6 6 0.0 kB 0.032s 0.010s
krecipes.units 0 45 45 1.1 kB 0.034s 0.007s 0.001s
krecipes.unit_list 0 65 65 0.4 kB 0.040s 0.008s
------------------------------ --------- --------- --------- --------- -------------- --------- ---------
COPY Threads Completion 0 4 4 0.931s
Create Indexes 0 25 25 0.413s
Index Build Completion 0 25 25 0.020s
Reset Sequences 0 13 13 0.140s
Primary Keys 0 13 13 0.033s
Create Foreign Keys 0 0 0 0.000s
Create Triggers 0 4 4 0.018s
Set Search Path 1 1 0 0.003s
Install Comments 0 0 0 0.000s
------------------------------ --------- --------- --------- --------- -------------- --------- ---------
Total import time ✓ 21743 21743 394.7 kB 1.558s
2019-04-18T11:22:41.323000+02:00 INFO Stopping monitor
```
I created the `KRecipes` db before so I don't understand the error (warning?) about the non-existing `krecipes` db - either names are case-insensitive and it should exist or they are not and pgloader does an unwanted case fold?
I'll admit that I have no idea how to check if the operation did complete successfully, I know nothing of this particular db nor how to just browse through them with some utility.
R.
|
The following error is a case sensitive error. It happens because pgloader doesn't quote the database name, and I think it should. Now, the impact of failing this step is minimal to non-existent, it's a convenience that you might not need after all, depending on how the application is coded.
The last line of the summary shows no errors so you're good to go, everything went fine. Now I'll keep that issue open for me to remember about adding support for database level GUCs when migrating from PostgreSQL to PostgreSQL, sounds useful, and I should also fix the quoting here of course. |
Hi,
All documentation I've found so far that relates to converting mysql databases assumes that the database is provided through a central server. What about applications (like KDE's akonadi) that fire up their own server?
I tried using the same base directory given to the mysql server but only got this far:
Idem when I try via the server's socket:
FWIW this is the mysqld server command:
This goes further but apparently fails:
I saw that same error when trying to convert the KRecipes database, which is provided through the central mysqld .
Am I doing something wrong or "SooL"?
EDIT: I'm (blissfully?) unaware of almost all hairy details of database use, management etc; I just use them through applications which offer several backends and am trying to follow migration instructions.
The text was updated successfully, but these errors were encountered: