All migrations fail when using Postgresql on Centos 6, with a "feature not supported" error on all database transactions when trying to migrate Drupal 7.43 to Drupal 8.1.2. (Both Drush and UI fail the same way.)
From error log:
Migration failed with source plugin exception: SQLSTATE[0A000]: Feature not supported: 7 ERROR: cross-database references are not implemented: "d8.public.migrate_map_d7_url_alias" LINE 4: LEFT OUTER JOIN d8.public.migrate_map_d7_url_alias m... ^: SELECT ua.*, map.sourceid1 AS migrate_map_sourceid1, map.source_row_status AS migrate_map_source_row_status FROM @url_alias ua LEFT OUTER JOIN d8.public.migrate_map_d7_url_alias map ON pid = map.sourceid1 WHERE ( (map.sourceid1 IS NULL ) OR (map.source_row_status = :db_condition_placeholder_0) ); Array ( [:db_condition_placeholder_0] => 1 )
Centos 6.8, Postgres 9.5.3, php 5.6.22. Same error for all tables in the migration.
Comment | File | Size | Author |
---|---|---|---|
#12 | sqlbase_mapjoinable-2742953-9-test-only.patch | 1.28 KB | mikeryan |
#9 | sqlbase_mapjoinable-2742953-9.patch | 2.16 KB | jofitz |
#9 | interdiff-7-9.txt | 1.27 KB | jofitz |
#7 | sqlbase_mapjoinable-2742953-7.patch | 908 bytes | Ada Hernandez |
Comments
Comment #2
dimr CreditAttribution: dimr commentedHi bperet,
did you solve it the problem?
I have the same error using SUSE Linux Enterprise Server 12 SP1 (x86_64), psql (PostgreSQL) 9.4.9 and PHP 7.0.14.
Thanks in advance
Comment #3
bzrudi71 CreditAttribution: bzrudi71 commentedThis should not happen :(
Adding PostgreSQL tag to more attention.
Comment #4
dimr CreditAttribution: dimr commentedComment #5
mikeryanSqlBase::mapJoinable() attempts to optimize by joining the source query (in the source database) to the map table (in the D8 database). PostgreSQL allows joins across schemas in the same database, but not across databases, so mapJoinable() should return FALSE if the driver is PostgreSQL and the databases do not match.
Workarounds for now:
ignore_map: true
in the source configuration of your migration.Comment #6
mikeryanNovice for the actual fix - tests will be most definitely not be novice.
Comment #7
Ada Hernandez CreditAttribution: Ada Hernandez at MTech, LLC commentedI've added a patch with the postgresql driver for actual version
Comment #9
jofitz CreditAttribution: jofitz at ComputerMinds commentedI've done a little work on the test, but PostgreSQL is on the edge of my knowledge so will require checking.
Comment #10
heddnThe novice aspects are completed. Cleaning up tags.
Comment #11
mikeryanComment #12
mikeryanUploading test-only patch, to verify the test is triggering the original problem here.
Comment #14
mikeryanI think this is OK. Note that the test is testing if mapJoinable() is reflecting the db array when it specified PostgreSQL, so it tests the same thing no matter what db engine the test is actually running under. I think this is OK, but the core committer may want to kick it back if they want to see a test that succeeds under MySQL and fails under PostgreSQL, which is more akin to the problem as seen in the wild.
Comment #15
alexpottCommitted and pushed 3441b94 to 8.4.x and 49e94bdf0 to 8.3.x. Thanks!
Let's get this in for now. But I think we should file a follow-up. Somehow we need to ask the database driver rather than hardcoding stuff here. Since this is just not going to work for non-core provided db drivers.