Обсуждение: [GENERAL] Postgres 10 Beta1 - pg_upgrade fails on Windows 10
I just tried pg_upgrade from the Postgres 10 Beta1 (from the BigSQL distribution) to upgrade a 9.6 cluster. pg_upgrade --check fails with the following messages: Performing Consistency Checks ----------------------------- Checking cluster versions ok Checking database user is the install user ok Checking database connection settings ok Checking for prepared transactions ok Checking for reg* system OID user data types ok Checking for contrib/isn with bigint-passing mismatch ok Checking for invalid "unknown" user columns ok Checking for presence of required libraries fatal Your installation references loadable libraries that are missing from the new installation. You can add these libraries to the new installation, or remove the functions using them from the old installation. A list of problem libraries is in the file: loadable_libraries.txt loadable_libraries.txt contains: could not load library "$libdir/pgxml": ERROR: could not load library "d:/etc/postgres-10/pgsql/lib/postgresql/pgxml.dll": unknown error 126 I ran pg_upgrade as administrator and regular user with the same results. I traced the file system calls of pg_upgrade usingProcessMonitor, but I couldn't see any obvious problems. I can supply the logfile of that trace if it helps. Postgres 10 itself runs just fine, and so does e.g. the new XMLTABLE function, so I am unsure why pg_upgrade isn't able toload that dll When I then run pg_upgrade without the --check option, it fails when taking the schema only dump from one database. The error message reported in the logfile is: pg_dump: unrecognized collation provider: p In the database where pg_dump (v10) fails, I have created the following custom collation: CREATE COLLATION "de" (lc_collate = 'German_Germany.1251', lc_ctype = 'German_Germany.1251'); ALTER COLLATION "de" OWNER TO "thomas"; pg_dump (9.6) runs fine with the same arguments on that database I can supply a (schema only) dump from the database in question if this helps Regards Thomas
Thomas Kellerer <spam_eater@gmx.net> writes: > I just tried pg_upgrade from the Postgres 10 Beta1 (from the BigSQL distribution) to upgrade a 9.6 cluster. > pg_upgrade --check fails with the following messages: > could not load library "$libdir/pgxml": > ERROR: could not load library "d:/etc/postgres-10/pgsql/lib/postgresql/pgxml.dll": unknown error 126 Apparently BigSQL forgot to include contrib/xml2 in their distribution; you should ping them about that one. > When I then run pg_upgrade without the --check option, it fails when taking the schema only dump from one database. > The error message reported in the logfile is: > pg_dump: unrecognized collation provider: p Ugh :-( ... seems like a rather obvious typo in dumpCollation(). Thanks for finding it! regards, tom lane
Tom Lane schrieb am 26.05.2017 um 20:18: >> I just tried pg_upgrade from the Postgres 10 Beta1 (from the BigSQL distribution) to upgrade a 9.6 cluster. >> pg_upgrade --check fails with the following messages: > >> could not load library "$libdir/pgxml": >> ERROR: could not load library "d:/etc/postgres-10/pgsql/lib/postgresql/pgxml.dll": unknown error 126 > > Apparently BigSQL forgot to include contrib/xml2 in their distribution; > you should ping them about that one. I wasn't sure where the problem is, I will report this to BigSQL as well. However, the xml2 extension is included. The extension control file as well as libxml2-2.dll. >> When I then run pg_upgrade without the --check option, it fails when taking the schema only dump from one database. >> The error message reported in the logfile is: >> pg_dump: unrecognized collation provider: p > > Ugh :-( ... seems like a rather obvious typo in dumpCollation(). > Thanks for finding it!
Thomas Kellerer wrote: > Tom Lane schrieb am 26.05.2017 um 20:18: > > > I just tried pg_upgrade from the Postgres 10 Beta1 (from the BigSQL distribution) to upgrade a 9.6 cluster. > > > pg_upgrade --check fails with the following messages: > > > > > could not load library "$libdir/pgxml": > > > ERROR: could not load library "d:/etc/postgres-10/pgsql/lib/postgresql/pgxml.dll": unknown error 126 > > > > Apparently BigSQL forgot to include contrib/xml2 in their distribution; > > you should ping them about that one. > > I wasn't sure where the problem is, I will report this to BigSQL as well. > > However, the xml2 extension is included. The extension control file as well as libxml2-2.dll. But the error message is looking for pgxml.dll, not libxml2-2.dll. Those are clearly different files. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
On 05/26/2017 01:58 PM, Alvaro Herrera wrote: > Thomas Kellerer wrote: >> Tom Lane schrieb am 26.05.2017 um 20:18: >>>> I just tried pg_upgrade from the Postgres 10 Beta1 (from the BigSQL distribution) to upgrade a 9.6 cluster. >>>> pg_upgrade --check fails with the following messages: >>> >>>> could not load library "$libdir/pgxml": >>>> ERROR: could not load library "d:/etc/postgres-10/pgsql/lib/postgresql/pgxml.dll": unknown error 126 >>> >>> Apparently BigSQL forgot to include contrib/xml2 in their distribution; >>> you should ping them about that one. >> >> I wasn't sure where the problem is, I will report this to BigSQL as well. >> >> However, the xml2 extension is included. The extension control file as well as libxml2-2.dll. > > But the error message is looking for pgxml.dll, not libxml2-2.dll. > Those are clearly different files. > Well Thomas is using pg_upgrade from a BigSQL 10beta1 install to upgrade from a 9.6 instance of unknown provenance. pg_upgrade is complaining that the 9.6 cluster has pgxml.dll whereas the 10beta1 cluster does not even though xml2 is installed on both clusters. The question is this a packaging oops on the part of BigSQL or something else? -- Adrian Klaver adrian.klaver@aklaver.com
Adrian Klaver <adrian.klaver@aklaver.com> writes: > Well Thomas is using pg_upgrade from a BigSQL 10beta1 install to upgrade > from a 9.6 instance of unknown provenance. pg_upgrade is complaining > that the 9.6 cluster has pgxml.dll whereas the 10beta1 cluster does not > even though xml2 is installed on both clusters. The question is this a > packaging oops on the part of BigSQL or something else? Actually, looking closer, the error message seems not to be "file not found": >>> could not load library "$libdir/pgxml": >>> ERROR: could not load library "d:/etc/postgres-10/pgsql/lib/postgresql/pgxml.dll": unknown error 126 If that's coming from port/dynloader/win32.c, as I think it must be because the non-conformant-to-message-style-guidelines phrase "unknown error" appears nowhere else in our tree, then that's an error code that FormatMessage doesn't recognize. Anybody have a clue what it means? regards, tom lane
On 05/26/2017 02:30 PM, Tom Lane wrote: > Adrian Klaver <adrian.klaver@aklaver.com> writes: >> Well Thomas is using pg_upgrade from a BigSQL 10beta1 install to upgrade >> from a 9.6 instance of unknown provenance. pg_upgrade is complaining >> that the 9.6 cluster has pgxml.dll whereas the 10beta1 cluster does not >> even though xml2 is installed on both clusters. The question is this a >> packaging oops on the part of BigSQL or something else? > > Actually, looking closer, the error message seems not to be "file not > found": > >>>> could not load library "$libdir/pgxml": >>>> ERROR: could not load library "d:/etc/postgres-10/pgsql/lib/postgresql/pgxml.dll": unknown error 126 > > If that's coming from port/dynloader/win32.c, as I think it must be > because the non-conformant-to-message-style-guidelines phrase "unknown > error" appears nowhere else in our tree, then that's an error code that > FormatMessage doesn't recognize. Anybody have a clue what it means? ? https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx "The System Error Codes are very broad. Each one can occur in one of many hundreds of locations in the system. Consequently the descriptions of these codes cannot be very specific. Use of these codes requires some amount of investigation and analysis. You need to note both the programmatic and the run-time context in which these errors occur. Because these codes are defined in WinError.h for anyone to use, sometimes the codes are returned by non-system software. Sometimes the code is returned by a function deep in the stack and far removed from your code that is handling the error." ERROR_MOD_NOT_FOUND 126 (0x7E) The specified module could not be found. > > regards, tom lane > -- Adrian Klaver adrian.klaver@aklaver.com
Adrian Klaver schrieb am 26.05.2017 um 23:16: >>>>> could not load library "$libdir/pgxml": >>>>> ERROR: could not load library "d:/etc/postgres-10/pgsql/lib/postgresql/pgxml.dll": unknown error 126 >>>> >>>> Apparently BigSQL forgot to include contrib/xml2 in their distribution; >>>> you should ping them about that one. >>> >>> I wasn't sure where the problem is, I will report this to BigSQL as well. >>> >>> However, the xml2 extension is included. The extension control file as well as libxml2-2.dll. >> >> But the error message is looking for pgxml.dll, not libxml2-2.dll. >> Those are clearly different files. > > Well Thomas is using pg_upgrade from a BigSQL 10beta1 install to > upgrade from a 9.6 instance of unknown provenance. pg_upgrade is > complaining that the 9.6 cluster has pgxml.dll whereas the 10beta1 > cluster does not even though xml2 is installed on both clusters. The > question is this a packaging oops on the part of BigSQL or something > else? Interesting enough, the same error message appears when I run "create extension xml2;" on Postgres 10. It somehow looks as if there is a DLL dependency between XML2 and whatever uses pgxml.dll (the new xmltable perhaps?) > from a 9.6 instance of unknown provenance The 9.6 installation is a 9.6.2 binary from EnterpriseDB (unfortunately they don't supply the beta binaries, otherwise Iwould have used those) Thomas
Adrian Klaver schrieb am 26.05.2017 um 23:41: >> If that's coming from port/dynloader/win32.c, as I think it must be >> because the non-conformant-to-message-style-guidelines phrase "unknown >> error" appears nowhere else in our tree, then that's an error code that >> FormatMessage doesn't recognize. Anybody have a clue what it means? > > > https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx > > "The System Error Codes are very broad. Each one can occur in one of > many hundreds of locations in the system. Consequently the > descriptions of these codes cannot be very specific. Use of these > codes requires some amount of investigation and analysis. You need to > note both the programmatic and the run-time context in which these > errors occur. Because these codes are defined in WinError.h for > anyone to use, sometimes the codes are returned by non-system > software. Sometimes the code is returned by a function deep in the > stack and far removed from your code that is handling the error." > > > ERROR_MOD_NOT_FOUND > > 126 (0x7E) > > The specified module could not be found. I thought so as well, but as I said the "trace" from ProcessMonitor didn't show any errors. It didn't even log an attempt to load that dll.
Thomas Kellerer <spam_eater@gmx.net> writes: > Interesting enough, the same error message appears when I run "create extension xml2;" on Postgres 10. Sure, that no doubt is exactly the command getting issued during the pg_upgrade attempt. > It somehow looks as if there is a DLL dependency between XML2 and whatever uses pgxml.dll (the new xmltable perhaps?) pgxml.dll *is* the dll name for contrib/xml2. I'm suspicious that what you're seeing is some sort of binary-level incompatibility between BigSQL's build of contrib/xml2 and whatever version of libxml2 you have installed. Hard to guess more than that. If you're not actually using contrib/xml2 in the 9.6 installation, probably dropping that extension would let you do the upgrade. regards, tom lane
Tom Lane schrieb am 26.05.2017 um 20:18: >> I just tried pg_upgrade from the Postgres 10 Beta1 (from the BigSQL distribution) to upgrade a 9.6 cluster. >> pg_upgrade --check fails with the following messages: > >> could not load library "$libdir/pgxml": >> ERROR: could not load library "d:/etc/postgres-10/pgsql/lib/postgresql/pgxml.dll": unknown error 126 > > Apparently BigSQL forgot to include contrib/xml2 in their distribution; > you should ping them about that one. I can confirm that it's a BigSQL problem. After I finally found the EnterpriseDB Beta binaries (they are pretty well hidden) I tested with those, and everything worksfine there. >> When I then run pg_upgrade without the --check option, it fails when taking the schema only dump from one database. >> The error message reported in the logfile is: >> pg_dump: unrecognized collation provider: p > > Ugh :-( ... seems like a rather obvious typo in dumpCollation(). > Thanks for finding it! When I drop that collation from the source database, pg_upgrade works without problems with the EnterprsieDB binaries.
On 05/28/2017 08:41 AM, Thomas Kellerer wrote: > Tom Lane schrieb am 26.05.2017 um 20:18: >> >> Apparently BigSQL forgot to include contrib/xml2 in their distribution; >> you should ping them about that one. > > I can confirm that it's a BigSQL problem. > After I finally found the EnterpriseDB Beta binaries (they are pretty > well hidden) I tested with those, and everything works fine there. For those following along, where would that be? -- Adrian Klaver adrian.klaver@aklaver.com
Thomas Kellerer <spam_eater@gmx.net> writes: > Tom Lane schrieb am 26.05.2017 um 20:18: >>> The error message reported in the logfile is: >>> pg_dump: unrecognized collation provider: p >> Ugh :-( ... seems like a rather obvious typo in dumpCollation(). >> Thanks for finding it! > When I drop that collation from the source database, pg_upgrade works without problems with the EnterprsieDB binaries. I committed a fix for that, will be in 10beta2. https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=764cb2b596ced6aea4d83fd52ff628bdedb63316 regards, tom lane
Adrian Klaver schrieb am 28.05.2017 um 17:51: >> After I finally found the EnterpriseDB Beta binaries (they are pretty well hidden) I tested with those, and everythingworks fine there. > > For those following along, where would that be? Here they are: https://www.enterprisedb.com/products-services-training/pgdevdownload Note that the "Binaries Version" (the ZIP download) is missing several .exe program (most importantly psql.exe and pg_dump.exebut some others as well). The files in the installer package are complete.