From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | George Weaver <gweaver(at)shaw(dot)ca> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to handle "could not find function xml_is_well_formed" when restoring database in Version 17 |
Date: | 2024-10-01 17:28:43 |
Message-ID: | 1865149.1727803723@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
George Weaver <gweaver(at)shaw(dot)ca> writes:
> I am testing upgrading from Version 13 to Version 17. I am getting the
> following error when trying to restore a database in Version 17 (the
> database was backed up from Version 13 using the Version 17 pg_dump):
> pg_Restore: error: could not execute query: ERROR: could not find
> function "xml_is_well_formed" in file "C:/Program
> Files/PostgreSQL/17/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';
What you appear to have here is a pre-9.1 version of the xml2
extension. That is so old that you're going to have difficulty
modernizing it. We used to provide scripts for converting those
loose objects into extensions, but we got rid of them in v13,
figuring that after ten years their usefulness had passed.
I think what you will have to do is manually drop all the xml2
functions (look for pg_proc entries with '$libdir/pgxml' in probin)
from the v13 database, then upgrade, then install the xml2 extension
if you still want it. Fortunately that module only provided functions
not datatypes, so this shouldn't be too painful. (Another way could
be to manually remove those CREATE FUNCTION commands from the dump
script.)
I'm betting that this database has a lot of other deferred
maintenance that you ought to think about while you're at it.
If there are any other old-style extensions in there, better
fix them up.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Sam Kidman | 2024-10-02 05:23:25 | pg_dump 17 produces files incompatible with older server versions |
Previous Message | Christoph Moench-Tegeder | 2024-10-01 17:25:54 | Re: How to handle "could not find function xml_is_well_formed" when restoring database in Version 17 |