pgloader version "3.6.cc2ce6e"
compiled with SBCL 2.1.1.debian
[x] did you test a fresh compile from the source tree?
I compiled the latest source code with SBCL.
[x] did you search for other similar issues?
[x] how can I reproduce the bug?
LOAD DATABASE
FROM postgresql://before:before@localhost:5456/before
INTO postgresql://after:after@localhost:5455/after
INCLUDING ONLY TABLE NAMES MATCHING ~/./ IN SCHEMA 'before'
ALTER SCHEMA 'before' rename to 'after'
;
[x] pgloader output you obtain
» pgloader test-issue.load
2023-05-18T23:17:07.006068-05:00 LOG pgloader version "3.6.cc2ce6e"
2023-05-18T23:17:07.007159-05:00 LOG Data errors in '/private/tmp/pgloader/'
2023-05-18T23:17:07.007188-05:00 LOG Parsing commands from file #P"/Users/mkusper/db-migration/test-issue.load"
2023-05-18T23:17:07.151934-05:00 LOG Migrating from #<PGSQL-CONNECTION pgsql://before@localhost:5456/before {700C72B103}>
2023-05-18T23:17:07.152016-05:00 LOG Migrating into #<PGSQL-CONNECTION pgsql://after@localhost:5455/after {700C72B653}>
KABOOM!
TYPE-ERROR: The value
NIL
is not of type
PGLOADER.CATALOG:COLUMN
An unhandled error condition has been signalled:
The value
NIL
is not of type
PGLOADER.CATALOG:COLUMN
What I am doing here?
The value
NIL
is not of type
PGLOADER.CATALOG:COLUMN
[x] data that is being loaded, if relevant
I added an example dump I am able to reproduce this with in a gist, but it seems pretty unrelated to the data.
[x] How the data is different from what you expected, if relevant
The above is just a test scenario which we can use to reproduce the issue easily, but I'd like to pair 'INCLUDING ONLY TABLE NAMES' and 'ALTER SCHEMA...RENAME TO' to be able to migrate many individual schemas from a few databases which each have dozens of their own schemas I am looking to separate. If these two options worked together and had the intended effect of taking the 'before' schema's tables and renaming it to 'after' (and also allowing me to cast to specific types within those schemas) that would be great, but it seems there is a bug preventing pgloader to reason about the schema in the catalog when both of these are used together.
I compiled the latest source code with SBCL.
[x] did you search for other similar issues?
[x] how can I reproduce the bug?
I added an example dump I am able to reproduce this with in a gist, but it seems pretty unrelated to the data.
The above is just a test scenario which we can use to reproduce the issue easily, but I'd like to pair 'INCLUDING ONLY TABLE NAMES' and 'ALTER SCHEMA...RENAME TO' to be able to migrate many individual schemas from a few databases which each have dozens of their own schemas I am looking to separate. If these two options worked together and had the intended effect of taking the 'before' schema's tables and renaming it to 'after' (and also allowing me to cast to specific types within those schemas) that would be great, but it seems there is a bug preventing pgloader to reason about the schema in the catalog when both of these are used together.