dimitri / pgloader

Migrate to PostgreSQL in a single command!
http://pgloader.io
Other
5.45k stars 548 forks source link

Option "rows per range" not working in PostgreSQL to PostgreSQL migration? #1550

Open JosefMachytkaNetApp opened 11 months ago

JosefMachytkaNetApp commented 11 months ago

Hello! I need your help. Documentation for PostgreSQL to PostgreSQL migration claims that I can use "rows per range" option:

* rows per range
How many rows are fetched per SELECT query when using multiple readers per thread, see above for details.

But pgloader of multiple versions (see below) refuses to parse config file if I add these options - I always get ESRAP-PARSE-ERROR for both multiple readers per thread and rows per range commands. Without them config file works.

I have huge migration pg2pg where I would really need to use these options, but pgloader refuses to parse them. Here is WITH part of my config file:

    WITH
        include drop,
        create tables,
        workers = 8,
        concurrency = 4, 
        multiple readers per thread,
        rows per range 1000000

Am I doing something wrongly? Is there some workaround? Thank you very much for your help!


&

&

KABOOM!
ESRAP-PARSE-ERROR: At

          workers = 8,
          concurrency = 4, 

                         ^ (Line 9, Column 23, Position 187)

In context PGSQL-OPTIONS:

While parsing PGSQL-OPTIONS. Expected:

     the character Tab
  or the character Newline
  or the character Return
  or the character Space
  or the string "--"
  or the string "/*"
  or the string "batch"
  or the string "concurrency"
  or the string "create"
  or the string "data"
  or the string "disable"
  or the string "downcase"
  or the string "drop"
  or the string "foreign"
  or the string "include"
  or the string "max"
  or the string "no"
  or the string "on"
  or the string "prefetch"
  or the string "preserve"
  or the string "quote"
  or the string "reset"
  or the string "schema"
  or the string "snake_case"
  or the string "truncate"
  or the string "uniquify"
  or the string "workers"
An unhandled error condition has been signalled: At

Thank you very much for your help!

mbanck-ntap commented 1 month ago

I had a look at the parser and it seems that this was an error or copy-pasto in the documentation updates in 56d24de6: Only the Mysql driver seems to support multiple readers per thread and rows per range unfortunately. I will see whether I can open a PR to fix this.