Re: pg_upgrade to 15 fails on Windows because of xml_is_well_formed()

2022-10-13 Thread Adrian Klaver

On 10/13/22 12:45, Thomas Kellerer wrote:

Tom Lane schrieb am 13.10.2022 um 21:01:
When trying pg_upgrade to upgrade Postgres 14 to 15 on Windows 10 



Hmm, the xml2 extension is not installed in any of those databases.

Most databases were probably migrated over time from 8.4
and I can't rule out that I did install xml2 there at some time
in the past.

I checked pg_proc and it the function was there twice: one in pg_catalog
and one in the public schema.


The one in the public schema would seem to be the smoking gun that 
points at xml2 having been installed from contrib in pre-extension days.




Regards
Thomas






--
Adrian Klaver
adrian.kla...@aklaver.com





Re: pg_upgrade to 15 fails on Windows because of xml_is_well_formed()

2022-10-13 Thread Thomas Kellerer

Tom Lane schrieb am 13.10.2022 um 21:01:

When trying pg_upgrade to upgrade Postgres 14 to 15 on Windows 10 this fails 
with:
pg_restore: error: could not execute query: ERROR:  could not find function 
"xml_is_well_formed" in file "c:/Program Files/PostgreSQL/15/lib/pgxml.dll"



I don't understand why this functions is included in the dump in the first 
place.


Indeed.  No such function should be present in any version of contrib/xml2
that was ever converted to extension style.  Have you never done that
in this DB?


Hmm, the xml2 extension is not installed in any of those databases.

Most databases were probably migrated over time from 8.4
and I can't rule out that I did install xml2 there at some time
in the past.

I checked pg_proc and it the function was there twice: one in pg_catalog
and one in the public schema.

After manually dropping the function from the public schema, pg_upgrade went 
through.

It's probably not worth investigating how it got there.

I tried to create and drop the xml2 extension to see if that maybe leaves
the "orphaned" function in the public schema, but I couldn't reproduce it.

Regards
Thomas






Re: pg_upgrade to 15 fails on Windows because of xml_is_well_formed()

2022-10-13 Thread Tom Lane
Thomas Kellerer  writes:
> When trying pg_upgrade to upgrade Postgres 14 to 15 on Windows 10 this fails 
> with:
> pg_restore: error: could not execute query: ERROR:  could not find function 
> "xml_is_well_formed" in file "c:/Program Files/PostgreSQL/15/lib/pgxml.dll"

> I don't understand why this functions is included in the dump in the first 
> place.

Indeed.  No such function should be present in any version of contrib/xml2
that was ever converted to extension style.  Have you never done that
in this DB?

regards, tom lane