dimitri / pgloader

Migrate to PostgreSQL in a single command!

Home Page:http://pgloader.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

no tables are found in geopackage/sqlite file

w0pr opened this issue · comments

commented
  • pgloader --version
  
pgloader version "3.6.10~devel"
compiled with SBCL 2.2.9.debian

  • did you test a fresh compile from the source tree?

yes.

  • did you search for other similar issues?

yes. found several other issues (regarding postgres password, etc), but nothing similar

  • how can I reproduce the bug?

    Command line, alternatively use command file (but I always get a "file not found", when using it):
    docker run -it pgloader:debian pgloader --debug --verbose --logfile pgloader.log sqlite://bees.sqlite pgsql://postgres@192.168.11.154:5432/qfield_samples

no tables are found, so no tables are migrated, pgloader finished without error, but no results.


load database
     from sqlite://bees.gpkg 
     into postgresql://postgres@172.24.64.1:5432/qfield_samples

 with include drop, create tables, create indexes, reset sequences, workers = 2, prefetch rows = 100

  set work_mem to '1024 MB', maintenance_work_mem to '1024 MB';
  • pgloader output you obtain
mkdir -p #P"/tmp/pgloader/"
pgloader version 3.6.10~devel
compiled with SBCL 2.2.9.debian
sb-impl::*default-external-format* :UTF-8
tmpdir: #P"/tmp/pgloader/"
2023-11-11T15:45:12.010000Z NOTICE Starting pgloader, log system is ready.
2023-11-11T15:45:12.020000Z INFO Starting monitor
2023-11-11T15:45:12.020000Z LOG pgloader version "3.6.10~devel"
2023-11-11T15:45:12.020000Z INFO     SOURCE: "sqlite://bees.sqlite"
2023-11-11T15:45:12.020000Z INFO SOURCE URI: #<PGLOADER.SOURCE.SQLITE:SQLITE-CONNECTION sqlite:///bees.sqlite {1005E313E3}>
2023-11-11T15:45:12.020000Z INFO     TARGET: "pgsql://postgres@192.168.11.154:5432/qfield_samples"
2023-11-11T15:45:12.020000Z INFO TARGET URI: #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://postgres@192.168.11.154:5432/qfield_samples {1005FFF353}>
2023-11-11T15:45:12.020000Z DEBUG LOAD DATA FROM #<PGLOADER.SOURCE.SQLITE:SQLITE-CONNECTION sqlite:///bees.sqlite {1005E313E3}>
2023-11-11T15:45:12.590000Z DEBUG CONNECTED TO #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://postgres@192.168.11.154:5432/qfield_samples {1005FFF353}>
2023-11-11T15:45:12.590000Z DEBUG SET client_encoding TO 'utf8'
2023-11-11T15:45:12.590000Z DEBUG SET application_name TO 'pgloader'
2023-11-11T15:45:12.610000Z LOG Migrating from #<SQLITE-CONNECTION sqlite:///bees.sqlite {1005E313E3}>
2023-11-11T15:45:12.610000Z LOG Migrating into #<PGSQL-CONNECTION pgsql://postgres@192.168.11.154:5432/qfield_samples {1005FFF353}>
2023-11-11T15:45:12.630000Z DEBUG CONNECTED TO /bees.sqlite
2023-11-11T15:45:12.630000Z SQL SQLite: SELECT tbl_name
  FROM sqlite_master
 WHERE tbl_name = 'sqlite_sequence'
2023-11-11T15:45:12.640000Z SQL SELECT tbl_name
  FROM sqlite_master
 WHERE type='table'
       AND tbl_name <> 'sqlite_sequence'


2023-11-11T15:45:12.650000Z INFO Processing source catalogs
2023-11-11T15:45:12.660000Z NOTICE Prepare PostgreSQL database.
2023-11-11T15:45:16.320000Z DEBUG CONNECTED TO #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://postgres@192.168.11.154:5432/qfield_samples {1005FFF353}>
2023-11-11T15:45:16.320000Z DEBUG SET client_encoding TO 'utf8'
2023-11-11T15:45:16.320000Z DEBUG SET application_name TO 'pgloader'
2023-11-11T15:45:16.330000Z DEBUG BEGIN
2023-11-11T15:45:16.350000Z DATA CATALOG: #1=#S(PGLOADER.CATALOG:CATALOG
               :NAME "bees"
               :SCHEMA-LIST (#S(PGLOADER.CATALOG:SCHEMA
                                :SOURCE-NAME NIL
                                :NAME NIL
                                :CATALOG #1#
                                :IN-SEARCH-PATH NIL
                                :TABLE-LIST NIL
                                :VIEW-LIST NIL
                                :MATVIEW-LIST NIL
                                :EXTENSION-LIST NIL
                                :SQLTYPE-LIST NIL))
               :TYPES-WITHOUT-BTREE (("aclitem" . "hash") ("box" . "gist")
                                     ("cid" . "hash") ("circle" . "gist")
                                     ("point" . "gist") ("polygon" . "gist")
                                     ("xid" . "hash"))
               :DISTRIBUTION-RULES NIL)
2023-11-11T15:45:16.360000Z INFO Done with COPYing data, waiting for indexes
2023-11-11T15:45:16.360000Z INFO Done waiting for indexes
2023-11-11T15:45:16.370000Z NOTICE Completing PostgreSQL database.
2023-11-11T15:45:16.370000Z NOTICE Reset sequences
2023-11-11T15:45:16.900000Z DEBUG CONNECTED TO #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://postgres@192.168.11.154:5432/qfield_samples {10082B1E23}>
2023-11-11T15:45:16.900000Z DEBUG SET client_encoding TO 'utf8'
2023-11-11T15:45:16.900000Z DEBUG SET application_name TO 'pgloader'
2023-11-11T15:45:16.910000Z DEBUG SET client_encoding TO 'utf8'
2023-11-11T15:45:16.910000Z DEBUG SET application_name TO 'pgloader'
2023-11-11T15:45:18.910000Z DEBUG CONNECTED TO #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://postgres@192.168.11.154:5432/qfield_samples {10082C4AF3}>
2023-11-11T15:45:18.910000Z DEBUG SET client_encoding TO 'utf8'
2023-11-11T15:45:18.910000Z DEBUG SET application_name TO 'pgloader'
2023-11-11T15:45:18.910000Z DEBUG BEGIN
2023-11-11T15:45:18.920000Z LOG report summary reset
             table name     errors       read   imported      bytes      total time       read      write
-----------------------  ---------  ---------  ---------  ---------  --------------  ---------  ---------
                  fetch          0          0          0                     0.000s
        fetch meta data          0          0          0                     0.030s
         Create Schemas          0          0          0                     0.000s
       Create SQL Types          0          0          0                     0.010s
          Create tables          0          0          0                     0.000s
         Set Table OIDs          0          0          0                     0.000s
-----------------------  ---------  ---------  ---------  ---------  --------------  ---------  ---------
-----------------------  ---------  ---------  ---------  ---------  --------------  ---------  ---------
COPY Threads Completion          0          4          4                     0.000s
 Index Build Completion          0          0          0                     0.000s
        Reset Sequences          0          0          0                     0.550s
           Primary Keys          0          0          0                     0.000s
    Create Foreign Keys          0          0          0                     0.000s
        Create Triggers          0          0          0                     0.010s
       Install Comments          0          0          0                     0.000s
-----------------------  ---------  ---------  ---------  ---------  --------------  ---------  ---------
      Total import time          ✓          0          0                     0.560s
2023-11-11T15:45:18.950000Z INFO Stopping monitor


Data loaded is a Geopackage sqlite file.

bees.gpkg.zip

commented

I rebuilt pgloader with Clozure CL and now it just works??