pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_upgrade to 15 fails on Windows because of xml_is_well_formed()
4+ messages / 3 participants
[nested] [flat]

* pg_upgrade to 15 fails on Windows because of xml_is_well_formed()
@ 2022-10-13 18:54  Thomas Kellerer <shammat@gmx.net>
  0 siblings, 1 reply; 4+ messages in thread

From: Thomas Kellerer @ 2022-10-13 18:54 UTC (permalink / raw)
  To: pgsql-general

When trying pg_upgrade to upgrade Postgres 14 to 15 on Windows 10 this fails with:

pg_restore: creating FUNCTION "public.xml_is_well_formed("text")"
pg_restore: while PROCESSING TOC:
pg_restore: from TOC entry 647; 1255 23216 FUNCTION xml_is_well_formed("text") postgres
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"
Command was: CREATE FUNCTION "public"."xml_is_well_formed"("text") RETURNS boolean
     LANGUAGE "c" IMMUTABLE STRICT
     AS '$libdir/pgxml', 'xml_is_well_formed';

The same error occurs when trying pg_dump/pg_restore, but the restore continues without further errors and the database is usable after that.

I don't understand why this functions is included in the dump in the first place.
A pristine 15 cluster already contains that function.


Any ideas?
Thomas






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_upgrade to 15 fails on Windows because of xml_is_well_formed()
@ 2022-10-13 19:01  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Thomas Kellerer <shammat@gmx.net>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2022-10-13 19:01 UTC (permalink / raw)
  To: Thomas Kellerer <shammat@gmx.net>; +Cc: pgsql-general

Thomas Kellerer <shammat@gmx.net> 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





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_upgrade to 15 fails on Windows because of xml_is_well_formed()
@ 2022-10-13 19:45  Thomas Kellerer <shammat@gmx.net>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Thomas Kellerer @ 2022-10-13 19:45 UTC (permalink / raw)
  To: pgsql-general; +Cc: Tom Lane <tgl@sss.pgh.pa.us>

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







^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_upgrade to 15 fails on Windows because of xml_is_well_formed()
@ 2022-10-13 19:53  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Thomas Kellerer <shammat@gmx.net>
  0 siblings, 0 replies; 4+ messages in thread

From: Adrian Klaver @ 2022-10-13 19:53 UTC (permalink / raw)
  To: Thomas Kellerer <shammat@gmx.net>; pgsql-general; +Cc: Tom Lane <tgl@sss.pgh.pa.us>

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.klaver@aklaver.com






^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2022-10-13 19:53 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-10-13 18:54 pg_upgrade to 15 fails on Windows because of xml_is_well_formed() Thomas Kellerer <shammat@gmx.net>
2022-10-13 19:01 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-10-13 19:45   ` Thomas Kellerer <shammat@gmx.net>
2022-10-13 19:53     ` Adrian Klaver <adrian.klaver@aklaver.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox