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 wrote: > On Wed, Jun 11, 2014 at 5:37 PM, Si Chen > wrote: > > The state is "idle". I don't have the state_change, but I wi

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

2014-06-11 Thread Tom Lane
Robert Haas writes: > On Tue, Jun 10, 2014 at 7:19 PM, Tom Lane 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'

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 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 pro

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 w

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 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 closing them or reusing them.

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 wrote: > From: pgsql-general-ow...@postgresql.org [mailto: > pgsql-general-ow...@postgresql.org] On Behalf Of Si Chen > Sent: Wednesday, June 11, 2

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 str

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 ju

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

[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] unknown type name ‘pg_int64’

2014-06-11 Thread Steve Crawford
On 06/11/2014 11:35 AM, Tom Lane wrote: Steve Crawford 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 n

Re: [GENERAL] unknown type name ‘pg_int64’

2014-06-11 Thread Tom Lane
Steve Crawford 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 ought to be defined in postgr

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 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 pg_restore command. Th

[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 -Wmis

Re: [GENERAL] Accessing structured datatypes using libpq

2014-06-11 Thread Merlin Moncure
On Wed, Jun 11, 2014 at 1:20 AM, Raimo Jormakka 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 binary access to these

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 > Wind

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 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 pg_stat_activity order > by query_st

[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 timeout

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" 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 pg_stat_activity order

[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 t

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 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 that anyone will

Re: [GENERAL] Accessing structured datatypes using libpq

2014-06-11 Thread Michael Paquier
On Wed, Jun 11, 2014 at 6:59 PM, Raimo Jormakka wrote: > 2014-06-11 9:44 GMT+03:00 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 JS

[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 Raimo Jormakka
2014-06-11 9:44 GMT+03:00 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 poss