[GENERAL] Accessing structured datatypes using libpq

2014-06-11 Thread Raimo Jormakka
Hi, What is the recommended way of accessing structured data-types (especially JSONB and HSTORE) using libpq? It seems that by default JSONB data for example is returned as text. Is it not possible to have binary access to these data-types? If it is possible, then how do I do it exactly as the

Re: [GENERAL] Accessing structured datatypes using libpq

2014-06-11 Thread John R Pierce
On 6/10/2014 11:20 PM, Raimo Jormakka wrote: What is the recommended way of accessing structured data-types (especially JSONB and HSTORE) using libpq? It seems that by default JSONB data for example is returned as text. Is it not possible to have binary access to these data-types? If it is

Re: [GENERAL] Accessing structured datatypes using libpq

2014-06-11 Thread Raimo Jormakka
2014-06-11 9:44 GMT+03:00 John R Pierce pie...@hogranch.com: On 6/10/2014 11:20 PM, Raimo Jormakka wrote: What is the recommended way of accessing structured data-types (especially JSONB and HSTORE) using libpq? It seems that by default JSONB data for example is returned as text. Is it

[GENERAL] eclipse-postgres

2014-06-11 Thread Ravi Kiran
hi, How to compile and run the files the source code of postgres in eclipse, how to compile a c program in the backend directory of postgres?? I followed the steps in https://wiki.postgresql.org/wiki/Working_with_Eclipse , but when I build the program nodeNestloop.c in the backend directory, I

Re: [GENERAL] Accessing structured datatypes using libpq

2014-06-11 Thread Michael Paquier
On Wed, Jun 11, 2014 at 6:59 PM, Raimo Jormakka raimo.jorma...@gmail.com wrote: 2014-06-11 9:44 GMT+03:00 John R Pierce pie...@hogranch.com: On 6/10/2014 11:20 PM, Raimo Jormakka wrote: What is the recommended way of accessing structured data-types (especially JSONB and HSTORE) using libpq?

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

2014-06-11 Thread Robert Haas
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 something worth fixing going forward. Agreed, although I'd be willing to see us slip it into 9.4. It's doubtful

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

2014-06-11 Thread Si Chen
I have a problem where postgresql 9.3 got stuck, and the number of postgresql processes increased from about 15 to 225 in 10 minutes. I ran the query: select pid, query_start, waiting, state, query from pg_stat_activity order by query_start; But it showed mostly select statements -- all of them

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

2014-06-11 Thread Ciba Sadaf
Dnt have any unfrmtn On 11-Jun-2014 9:30 PM, Si Chen sic...@opensourcestrategies.com wrote: I have a problem where postgresql 9.3 got stuck, and the number of postgresql processes increased from about 15 to 225 in 10 minutes. I ran the query: select pid, query_start, waiting, state, query

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

2014-06-11 Thread boca2608
First, we have tried many suggestions found in this and other sites. But the problem has not been solved. 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 terse error about

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

2014-06-11 Thread Jeff Janes
On Wed, Jun 11, 2014 at 8:59 AM, Si Chen sic...@opensourcestrategies.com wrote: I have a problem where postgresql 9.3 got stuck, and the number of postgresql processes increased from about 15 to 225 in 10 minutes. I ran the query: select pid, query_start, waiting, state, query from

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

2014-06-11 Thread Raymond O'Donnell
On 11/06/2014 17:05, boca2608 wrote: First, we have tried many suggestions found in this and other sites. But the problem has not been solved. 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

Re: [GENERAL] Accessing structured datatypes using libpq

2014-06-11 Thread Merlin Moncure
On Wed, Jun 11, 2014 at 1:20 AM, Raimo Jormakka raimo.jorma...@gmail.com wrote: Hi, What is the recommended way of accessing structured data-types (especially JSONB and HSTORE) using libpq? It seems that by default JSONB data for example is returned as text. Is it not possible to have

[GENERAL] unknown type name ‘pg_int64’

2014-06-11 Thread Steve Crawford
I am getting the error following errors trying to install pg_repack via pgxn on Ubuntu server 12.04.4 with all PostgreSQL packages from pgdg: gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC -pie -fno-omit-frame-pointer -Wall

Re: [GENERAL] How can I tell if pg_restore is running?

2014-06-11 Thread Moshe Jacobson
On Tue, Jun 10, 2014 at 10:57 AM, Francisco Olarte fola...@peoplecall.com wrote: Is there any reason to avoid pg_restore --disable-triggers ? Yes, this extension needs to work with everyone's normal restore process. Otherwise I would have to ask everyone who used my extension to modify their

Re: [GENERAL] unknown type name ‘pg_int64’

2014-06-11 Thread Tom Lane
Steve Crawford scrawf...@pinpointresearch.com writes: I am getting the error following errors trying to install pg_repack via pgxn on Ubuntu server 12.04.4 with all PostgreSQL packages from pgdg: /usr/include/postgresql/libpq-fe.h:547:1: error: unknown type name ‘pg_int64’ That type name

Re: [GENERAL] unknown type name ‘pg_int64’

2014-06-11 Thread Steve Crawford
On 06/11/2014 11:35 AM, Tom Lane wrote: Steve Crawford scrawf...@pinpointresearch.com writes: I am getting the error following errors trying to install pg_repack via pgxn on Ubuntu server 12.04.4 with all PostgreSQL packages from pgdg: /usr/include/postgresql/libpq-fe.h:547:1: error: unknown

[GENERAL] max_connections reached in postgres 9.3.3

2014-06-11 Thread Vasudevan, Ramya
Our set up: * Db version: postgres 9.3.3 * OS: CentOS 6.5 * kernel Version - Linux 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux * cpu - 24 proc * memory - 768 GB * The disks are SAN fiber. *

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

2014-06-11 Thread Si Chen
I didn't see any from the log. It was just a whole bunch of pretty standard looking SELECT queries. There were no INSERT/COMMIT statements which were still active before the SELECT's, just a few which are waiting after a lot of SELECT statements. Also, if the process just shows COMMIT, is there

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

2014-06-11 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 4:34 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] what does pg_activity mean when the database is stuck? I didn't see any from the log.  It was

Re: [GENERAL] max_connections reached in postgres 9.3.3

2014-06-11 Thread Adrian Klaver
On 06/11/2014 11:24 AM, Vasudevan, Ramya wrote: Our set up: ·Db version: postgres 9.3.3 ·OS: CentOS 6.5 ·kernel Version - Linux 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux ·cpu - 24 proc ·memory - 768 GB ·The disks are SAN fiber. ·We have

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

2014-06-11 Thread Si Chen
The state is idle. I don't have the state_change, but I will try to collect it if it happens again. On Wed, Jun 11, 2014 at 1:46 PM, Igor Neyman iney...@perceptron.com wrote: From: pgsql-general-ow...@postgresql.org [mailto: pgsql-general-ow...@postgresql.org] On Behalf Of Si Chen Sent:

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

2014-06-11 Thread Merlin Moncure
On Wed, Jun 11, 2014 at 5:37 PM, Si Chen sic...@opensourcestrategies.com wrote: The state is idle. I don't have the state_change, but I will try to collect it if it happens again. If they are idle, then the problem is probably with your application -- you're grabbing new connections and not

Re: [GENERAL] How can I tell if pg_restore is running?

2014-06-11 Thread Keith
If you can't use a wrapper script and you can't use that flag, I'm not sure how you're going to manage to keep this a process that's simple for a typical end user to manage. From what I know, there's nothing internally on the data loading process that pg_restore uses that would guarantee you that

Re: [GENERAL] max_connections reached in postgres 9.3.3

2014-06-11 Thread Merlin Moncure
On Wed, Jun 11, 2014 at 1:24 PM, Vasudevan, Ramya ramya.vasude...@classmates.com wrote: Our set up: · Db version: postgres 9.3.3 · OS: CentOS 6.5 · kernel Version - Linux 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux ·

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

2014-06-11 Thread Tom Lane
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 something worth fixing going forward. Agreed, although I'd be willing

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

2014-06-11 Thread Si Chen
Is there a way to configure postgresql to automatically release connections that have been idle for a set amount of time? On Wed, Jun 11, 2014 at 3:41 PM, Merlin Moncure mmonc...@gmail.com wrote: On Wed, Jun 11, 2014 at 5:37 PM, Si Chen sic...@opensourcestrategies.com wrote: The state is