Thread: Postgres 9.2.4 - rebuild PostgreSQL using --with-libxml
Hi all
I was asked by application dev to rebuild PostgreSQL with libxml because they get the following error from the server.
WITH x(col) AS (SELECT '<?xml version="1.0" ?><response><status>ERROR_MISSING_DATA</status></response>'::xml)
SELECT xpath('./status/text()', col) AS status
FROM x;
LINE 1: WITH x(col) AS (SELECT '<?xml version="1.0" ?><response><sta...
^
DETAIL: This functionality requires the server to be built with libxml support.
HINT: You need to rebuild PostgreSQL using --with-libxml.
I then did the following:
1. We installed library 'xml2' (version >= 2.6.23)
2. ./configure --with-libxml
3. gmake
4. gmake install
I did not touch the database. They‘re getting the same error. Please advise if there was something else I needed to do.
Thanks
CONFIDENTIALITY NOTICE The contents of and attachments to this e-mail are intended for the addressee only, and may contain the confidential information of Argility (Proprietary) Limited and/or its subsidiaries. Any review, use or dissemination thereof by anyone other than the intended addressee is prohibited.If you are not the intended addressee please notify the writer immediately and destroy the e-mail. Argility (Proprietary) Limited and its subsidiaries distance themselves from and accept no liability for unauthorised use of their e-mail facilities or e-mails sent other than strictly for business purposes.
I then did the following:
1. We installed library 'xml2' (version >= 2.6.23)
2. ./configure --with-libxml
3. gmake
4. gmake install
was the previous version custom built with /no/ options ?
what OS/distribution is this on?
-- john r pierce 37N 122W somewhere on the middle of the left coast
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of John R Pierce
Sent: Thursday, June 12, 2014 10:34 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Postgres 9.2.4 - rebuild PostgreSQL using --with-libxml
On 6/12/2014 1:23 AM, Khangelani Gama wrote:
I then did the following:
1. We installed library 'xml2' (version >= 2.6.23)
2. ./configure --with-libxml
3. gmake
4. gmake install
was the previous version custom built with /no/ options ?
-I am not sure because it’s setup I was not involved in
what OS/distribution is this on?
- it’s running on CentOS release 6.4 (Final)
Another example:
c9900=# begin ;
BEGIN
c9900=# create table kmgtest (col1 xml);
CREATE TABLE
c9900=# insert into kmgtest values ('<one>something</one>');
ERROR: unsupported XML feature
LINE 1: insert into kmgtest values ('<one>something</one>');
^
DETAIL: This functionality requires the server to be built with libxml support.
HINT: You need to rebuild PostgreSQL using --with-libxml.
--
john r pierce 37N 122W
somewhere on the middle of the left coast
CONFIDENTIALITY NOTICE The contents of and attachments to this e-mail are intended for the addressee only, and may contain the confidential information of Argility (Proprietary) Limited and/or its subsidiaries. Any review, use or dissemination thereof by anyone other than the intended addressee is prohibited.If you are not the intended addressee please notify the writer immediately and destroy the e-mail. Argility (Proprietary) Limited and its subsidiaries distance themselves from and accept no liability for unauthorised use of their e-mail facilities or e-mails sent other than strictly for business purposes.
On 06/12/2014 04:23 PM, Khangelani Gama wrote: > 2. ./configure --with-libxml Check your config.log to make sure it actually found libxml. Depending on how you installed it, it might not be found by configure without an explicit path - a --with-libxml=/path/to/libxml/install/dir Why aren't you using operating system packages? And why 9.2.4? -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
On 14/06/12 17:23, Khangelani Gama wrote: > Hi all (...) > I then did the following: > > 1. We installed library 'xml2' (version >= 2.6.23) > 2. ./configure --with-libxml > 3. gmake > 4. gmake install > > I did not touch the database. They‘re getting the same error. Please advise if there was something else I needed to do. Was the database server restarted after the new version was built? Regards Ian Barwick -- Ian Barwick http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
-----Original Message----- From: Ian Barwick [mailto:ian@2ndquadrant.com] Sent: Thursday, June 12, 2014 11:05 AM To: Khangelani Gama; pgsql-general@postgresql.org Subject: Re: [GENERAL] Postgres 9.2.4 - rebuild PostgreSQL using --with-libxml On 14/06/12 17:23, Khangelani Gama wrote: > Hi all (...) > I then did the following: > > 1. We installed library 'xml2' (version >= 2.6.23) 2. ./configure > --with-libxml 3. gmake 4. gmake install > > I did not touch the database. They‘re getting the same error. Please > advise if there was something else I needed to do. Was the database server restarted after the new version was built? It was not restarted - Should I do so? -- Ian Barwick http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services CONFIDENTIALITY NOTICE The contents of and attachments to this e-mail are intended for the addressee only, and may contain the confidential information of Argility (Proprietary) Limited and/or its subsidiaries. Any review, use or dissemination thereof by anyone other than the intended addressee is prohibited.If you are not the intended addressee please notify the writer immediately and destroy the e-mail. Argility (Proprietary) Limited and its subsidiaries distance themselves from and accept no liability for unauthorised use of their e-mail facilities or e-mails sent other than strictly for business purposes.
On 14/06/12 18:06, Khangelani Gama wrote: > On 14/06/12 17:23, Khangelani Gama wrote: >> Hi all > (...) >> I then did the following: >> >> 1. We installed library 'xml2' (version >= 2.6.23) 2. ./configure >> --with-libxml 3. gmake 4. gmake install >> >> I did not touch the database. They‘re getting the same error. Please >> advise if there was something else I needed to do. > > Was the database server restarted after the new version was built? > It was not restarted - Should I do so? Yes, otherwise the old binary will still be running. Do also take note of Craig Ringer's email on this thread; in particular you should always run the latest minor version, which is currently 9.2.8. Regards Ian Barwick -- Ian Barwick http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
> Was the database server restarted after the new version was built? > It was not restarted - Should I do so? Yes, otherwise the old binary will still be running. Do also take note of Craig Ringer's email on this thread; in particular you should always run the latest minor version, which is currently 9.2.8. > Was the database server restarted after the new version was built? > It was not restarted - Should I do so? Yes, otherwise the old binary will still be running. Do also take note of Craig Ringer's email on this thread; in particular you should always run the latest minor version, which is currently 9.2.8. Thanks very much, I restarted the database and the problem was fixed. We will look into using the versions as suggested below -- Ian Barwick http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services CONFIDENTIALITY NOTICE The contents of and attachments to this e-mail are intended for the addressee only, and may contain the confidential information of Argility (Proprietary) Limited and/or its subsidiaries. Any review, use or dissemination thereof by anyone other than the intended addressee is prohibited.If you are not the intended addressee please notify the writer immediately and destroy the e-mail. Argility (Proprietary) Limited and its subsidiaries distance themselves from and accept no liability for unauthorised use of their e-mail facilities or e-mails sent other than strictly for business purposes.
On 6/12/2014 2:06 AM, Khangelani Gama wrote: > Was the database server restarted after the new version was built? > It was not restarted - Should I do so? why aren't you running the version in the pgdg yum repository, which includes XML support and a lot more. -- john r pierce 37N 122W somewhere on the middle of the left coast