[GENERAL] Postgres 9.2.4 - rebuild PostgreSQL using --with-libxml

2014-06-12 Thread Khangelani Gama
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 ?responsestatusERROR_MISSING_DATA/status/response'::xml) SELECT xpath('./status/text()', col) AS status FROM x; LINE

Re: [GENERAL] Postgres 9.2.4 - rebuild PostgreSQL using --with-libxml

2014-06-12 Thread John R Pierce
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 ? what OS/distribution is this on? -- john r pierce

Re: [GENERAL] Postgres 9.2.4 - rebuild PostgreSQL using --with-libxml

2014-06-12 Thread Khangelani Gama
*From:* pgsql-general-ow...@postgresql.org [mailto: pgsql-general-ow...@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,

Re: [GENERAL] Postgres 9.2.4 - rebuild PostgreSQL using --with-libxml

2014-06-12 Thread Craig Ringer
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

Re: [GENERAL] Postgres 9.2.4 - rebuild PostgreSQL using --with-libxml

2014-06-12 Thread Ian Barwick
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

Re: [GENERAL] Postgres 9.2.4 - rebuild PostgreSQL using --with-libxml

2014-06-12 Thread Khangelani Gama
-Original Message- From: Ian Barwick [mailto:i...@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

Re: [GENERAL] Postgres 9.2.4 - rebuild PostgreSQL using --with-libxml

2014-06-12 Thread Ian Barwick
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

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-12 Thread Michael Paquier
On Thu, Jun 12, 2014 at 11:44 AM, Si Chen sic...@opensourcestrategies.com wrote: Is there a way to configure postgresql to automatically release connections that have been idle for a set amount of time? Not directly. However with 9.3 you could use a background worker like this one:

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-12 Thread Michael Paquier
On Thu, Jun 12, 2014 at 6:34 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Jun 12, 2014 at 11:44 AM, Si Chen sic...@opensourcestrategies.com wrote: Is there a way to configure postgresql to automatically release connections that have been idle for a set amount of time? Not

Re: [GENERAL] Postgres 9.2.4 - rebuild PostgreSQL using --with-libxml

2014-06-12 Thread Khangelani Gama
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

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-12 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Si Chen Sent: Wednesday, June 11, 2014 10:44 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] what does pg_activity mean when the database is stuck? Is there a way to configure postgresql

[GENERAL] Re: Cannot start Postgresql 9.3 as a service in Windows 2012 Server with a domain account

2014-06-12 Thread boca2608
Thanks Ray. But unfortunately, there is no log entry in the postgresql log (as in the data/pg_log folder). The log file is empty. I checked the log before and after the error. Thanks, John -- View this message in context:

[GENERAL] Re: Cannot start Postgresql 9.3 as a service in Windows 2012 Server with a domain account

2014-06-12 Thread boca2608
Krystian Bigaj replied this in a separate email, which led to some interesting information that I would like to share in this mailing list. He suggested the use of the Process Monitor app to log the process events during the startup of the service and look for ACCESS DENIED errors. Here is what

Re: [GENERAL] Re: Cannot start Postgresql 9.3 as a service in Windows 2012 Server with a domain account

2014-06-12 Thread Igor Neyman
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- ow...@postgresql.org] On Behalf Of boca2608 Sent: Thursday, June 12, 2014 10:00 AM To: pgsql-general@postgresql.org Subject: [GENERAL] Re: Cannot start Postgresql 9.3 as a service in Windows 2012

Re: [GENERAL] Re: Cannot start Postgresql 9.3 as a service in Windows 2012 Server with a domain account

2014-06-12 Thread Raymond O'Donnell
On 12/06/2014 14:51, boca2608 wrote: Thanks Ray. But unfortunately, there is no log entry in the postgresql log (as in the data/pg_log folder). The log file is empty. I checked the log before and after the error. OK. You may need to enable logging (though I thought the EnterpriseDB installer

[GENERAL] OpenSSL Vulnerabilities

2014-06-12 Thread Saravanan Subramaniyan
Hi All, Recently OpenSSL released Security Advisory. Please refer below link http://www.openssl.org/news/secadv_20140605.txt. We are using postgresql version 9.2.8 which is vulnerable. Is postgresql planning to release new version which include OpenSSL 1.0.1h? Thanks V.S.Saravanan

Re: [GENERAL] OpenSSL Vulnerabilities

2014-06-12 Thread Magnus Hagander
On Thu, Jun 12, 2014 at 8:43 AM, Saravanan Subramaniyan sara1...@gmail.com wrote: Hi All, Recently OpenSSL released Security Advisory. Please refer below link http://www.openssl.org/news/secadv_20140605.txt. We are using postgresql version 9.2.8 which is vulnerable. Is postgresql

Re: [GENERAL] Re: Cannot start Postgresql 9.3 as a service in Windows 2012 Server with a domain account

2014-06-12 Thread Krystian Bigaj
On 12 June 2014 15:59, boca2608 boca2...@gmail.com wrote: Krystian Bigaj replied this in a separate email, which led to some interesting information that I would like to share in this mailing list. He suggested the use of the Process Monitor app to log the process events during the startup

Re: [GENERAL] Re: Cannot start Postgresql 9.3 as a service in Windows 2012 Server with a domain account

2014-06-12 Thread Krystian Bigaj
(re-posting, because I've used Reply, instead of Reply all, thanks) On 11 June 2014 18:05, boca2608 boca2...@gmail.com wrote: When trying to start postgresql as a service with a domain account on a windows 2012 server, the service starts and stops immediately. The Windows event log showed a

[GENERAL] Re: Cannot start Postgresql 9.3 as a service in Windows 2012 Server with a domain account

2014-06-12 Thread boca2608
Igor, Our network security policy requires that such database services run under a dedicated domain account. (Postgresql does run successfully under local system account and the default NETWORK SERVICE account.) Thanks, John From: Igor Neyman [via PostgreSQL]

Re: [GENERAL] Re: Cannot start Postgresql 9.3 as a service in Windows 2012 Server with a domain account

2014-06-12 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of boca2608 Sent: Thursday, June 12, 2014 11:05 AM To: pgsql-general@postgresql.org Subject: [GENERAL] Re: Cannot start Postgresql 9.3 as a service in Windows 2012 Server with a domain account Igor,  

Re: [GENERAL] Postgres 9.2.4 - rebuild PostgreSQL using --with-libxml

2014-06-12 Thread John R Pierce
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

[GENERAL] Re: Cannot start Postgresql 9.3 as a service in Windows 2012 Server with a domain account

2014-06-12 Thread boca2608
After adding the domain user account into the local users group, the postgresql service can be started successfully now. We will do more testing to make sure that all postgresql functions are working. But I want to give my big thanks to Krystian Bigaj, Igor Neyman and Raymond O'Donnell for

Re: [GENERAL] Re: Cannot start Postgresql 9.3 as a service in Windows 2012 Server with a domain account

2014-06-12 Thread Igor Neyman
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- ow...@postgresql.org] On Behalf Of boca2608 Sent: Thursday, June 12, 2014 12:33 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Re: Cannot start Postgresql 9.3 as a service in Windows 2012

[GENERAL] HOT standby with ONLY WAL shipping?

2014-06-12 Thread CS_DBA
Hi All; We would like to setup a hot standby server with a forced delay. Is it possible to setup a hot standby based ONLY on WAL shipping and NOT use streaming replication? Thanks in advance -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

[GENERAL] pg_dump enhancement ?

2014-06-12 Thread Karsten Hilbert
Let's assume there's a table dem.address CREATE TABLE address ( id integer NOT NULL, id_street integer NOT NULL, aux_street text, number text NOT NULL, subunit text, addendum text, lat_lon point )

Re: [GENERAL] HOT standby with ONLY WAL shipping?

2014-06-12 Thread Bosco Rama
On 06/12/14 10:01, CS_DBA wrote: We would like to setup a hot standby server with a forced delay. Is it possible to setup a hot standby based ONLY on WAL shipping and NOT use streaming replication? Yes it is. Though, I assume you mean 'forced max sync period' as opposed to 'forced delay'.

[GENERAL] updates not causing changes

2014-06-12 Thread Torsten Förtsch
Hi, our developers use a ORM tool which generates updates that write all columns of a table. In most cases, however, very few columns actually change. So, those updates mostly write the same value that already is there in the column. Now, if there is an index on such columns, does Postgres

Re: [HACKERS] [GENERAL] Question about partial functional indexes and the query planner

2014-06-12 Thread Keith Fiske
On Wed, Jun 11, 2014 at 7:24 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Jun 10, 2014 at 7:19 PM, Tom Lane t...@sss.pgh.pa.us wrote: Given the lack of previous complaints, I'm not sure this amounts to a back-patchable bug, but it does seem like

Re: [GENERAL] max_connections reached in postgres 9.3.3

2014-06-12 Thread Merlin Moncure
On Thu, Jun 12, 2014 at 1:23 PM, Vasudevan, Ramya ramya.vasude...@classmates.com wrote: Thank you for the response. On further investigation, we found out that select statements were happening normally. But DMLs (writes to the DB) were hung for minutes at a time, and some of them went

Re: [GENERAL] updates not causing changes

2014-06-12 Thread Jeff Janes
On Thu, Jun 12, 2014 at 10:22 AM, Torsten Förtsch torsten.foert...@gmx.net wrote: Hi, our developers use a ORM tool which generates updates that write all columns of a table. In most cases, however, very few columns actually change. So, those updates mostly write the same value that already

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-12 Thread Jerry Sievers
Si Chen sic...@opensourcestrategies.com writes: Is there a way to configure postgresql to automatically release connections that have been idle for a set amount of time? I've seen recent discussion in hackers that this may be added to an upcoming release. On Wed, Jun 11, 2014 at 3:41 PM,

Re: [GENERAL] max_connections reached in postgres 9.3.3

2014-06-12 Thread Merlin Moncure
On Thu, Jun 12, 2014 at 1:51 PM, Vasudevan, Ramya ramya.vasude...@classmates.com wrote: Thanks Merlin. We did look at the locks in the DB and all we saw were RowExclusiveLock, AccessShareLock, RowShareLock, AccessExclusiveLock. The ExclusiveLocks we saw were all in the virtualxids. I

[GENERAL] locking order

2014-06-12 Thread Torsten Förtsch
Hi, when a row is updated a RowExclusiveLock is obtained on the updated row and on every related index. Is the order in which these locks are acquired defined in some way? Thanks, Torsten -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] max_connections reached in postgres 9.3.3

2014-06-12 Thread Vasudevan, Ramya
Thanks Merlin. We did look at the locks in the DB and all we saw were RowExclusiveLock, AccessShareLock, RowShareLock, AccessExclusiveLock. The ExclusiveLocks we saw were all in the virtualxids. I think the max_connections maxing out is due to the DB not being able to write and complete

Re: [GENERAL] max_connections reached in postgres 9.3.3

2014-06-12 Thread Vasudevan, Ramya
Thank you for the response. On further investigation, we found out that select statements were happening normally. But DMLs (writes to the DB) were hung for minutes at a time, and some of them went through. And we had 2 checkpoints during this period. Yesterday when we had the issue, we had

Re: [GENERAL] max_connections reached in postgres 9.3.3

2014-06-12 Thread Kevin Grittner
Merlin Moncure mmonc...@gmail.com wrote: or something else entirely. It strikes me that this might be relevant: http://wiki.postgresql.org/wiki/Number_Of_Database_Connections -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general

Re: [GENERAL] Spurious Stalls

2014-06-12 Thread John R Pierce
On 6/12/2014 12:57 PM, Christopher Nielsen wrote: With a problem like this, I am not exactly positive how to proceed. I am really looking forward to hearing your thoughts, and opinions, if you can share them. keep a shell session open with a superuser role (eg, postgres), and next time

Re: [GENERAL] max_connections reached in postgres 9.3.3

2014-06-12 Thread Merlin Moncure
On Thu, Jun 12, 2014 at 3:32 PM, Kevin Grittner kgri...@ymail.com wrote: Merlin Moncure mmonc...@gmail.com wrote: or something else entirely. It strikes me that this might be relevant: Agreed. The stock advice to many, many problems of this sort is 'use pgbouncer' but it can be hard to

[GENERAL] Memory leak with CREATE TEMP TABLE ON COMMIT DROP?

2014-06-12 Thread Eric Ridge
# select version(); version --- PostgreSQL

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-12 Thread Si Chen
PgBouncer looks pretty cool. Do you recommend using it with jdbc with about 50 - 100 normal connections? On Thu, Jun 12, 2014 at 6:35 AM, Igor Neyman iney...@perceptron.com wrote: From: pgsql-general-ow...@postgresql.org [mailto: pgsql-general-ow...@postgresql.org] On Behalf Of Si Chen

Re: [GENERAL] Spurious Stalls

2014-06-12 Thread Scott Marlowe
On Thu, Jun 12, 2014 at 1:57 PM, Christopher Nielsen cniel...@atlassian.com wrote: Lately, though, about once a day now, for about a week, we have been experiencing periods of stalling. When Postgres stalls, we haven't been able to recover, without restarting the database, unfortunately.

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-12 Thread John R Pierce
On 6/12/2014 4:24 PM, Si Chen wrote: PgBouncer looks pretty cool. Do you recommend using it with jdbc with about 50 - 100 normal connections? Java has quite a few built in connection pooling options. they all work best if your software is configured to grab a connection, use it for a

Re: [GENERAL] Memory leak with CREATE TEMP TABLE ON COMMIT DROP?

2014-06-12 Thread Tom Lane
Eric Ridge e_ri...@tcdi.com writes: As best I can guess, Postgres has some kind of memory leak around (at least) temporary tables flagged to drop on commit. It's fairly easy to reproduce: I don't see any memory leak with this example. What I do see is the process's use of shared memory grows

Re: [GENERAL] max_connections reached in postgres 9.3.3

2014-06-12 Thread Kevin Grittner
Merlin Moncure mmonc...@gmail.com wrote: we have to be careful to rule out some underlying possible contributing factors before switching up things up to much. Agreed. THP compaction in particular has plaguing servers throughout the company I work for; I've seen many support tickets where