Re: [GENERAL] Is max connections in a table somewhere?

2011-08-11 Thread Geoffrey Myers

Adrian Klaver wrote:

On Wednesday, August 10, 2011 11:47:25 am Geoffrey Myers wrote:

Is max connections in any table in the database I can access?


SELECT current_setting('max_connections');
 current_setting 
-

 100



Thanks for all the responses folks.  Obviously, there's more then one 
way to skin this cat.



--
Until later, Geoffrey

I predict future happiness for America if they can prevent
the government from wasting the labors of the people under
the pretense of taking care of them.
- Thomas Jefferson

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Is max connections in a table somewhere?

2011-08-10 Thread Geoffrey Myers

Is max connections in any table in the database I can access?
--
Until later, Geoffrey

I predict future happiness for America if they can prevent
the government from wasting the labors of the people under
the pretense of taking care of them.
- Thomas Jefferson

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Is max connections in a table somewhere?

2011-08-10 Thread Andy Colson

On 8/10/2011 1:47 PM, Geoffrey Myers wrote:

Is max connections in any table in the database I can access?


Not really a table, but it is selectable:

show max_connections;

use show all to see everything.

-Andy

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Is max connections in a table somewhere?

2011-08-10 Thread Scott Marlowe
On Wed, Aug 10, 2011 at 12:47 PM, Geoffrey Myers
li...@serioustechnology.com wrote:
 Is max connections in any table in the database I can access?

No it's in the postgresql.conf file, which is in various places
depending on how pg was installed.  for debian / ubuntu it's in
/etc/postgresql/8.x/main for the default cluster.  It's in
/var/lib/pgsql/data for RHEL 5.  Not sure about other distros.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Is max connections in a table somewhere?

2011-08-10 Thread Guillaume Lelarge
On Wed, 2011-08-10 at 13:41 -0500, Andy Colson wrote:
 On 8/10/2011 1:47 PM, Geoffrey Myers wrote:
  Is max connections in any table in the database I can access?
 
 Not really a table, but it is selectable:
 
 show max_connections;
 
 use show all to see everything.
 

Actually, it's also available in a table (pg_settings).


-- 
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Is max connections in a table somewhere?

2011-08-10 Thread Ray Stell
On Wed, Aug 10, 2011 at 02:47:25PM -0400, Geoffrey Myers wrote:
 Is max connections in any table in the database I can access?

edbstore= \d pg_catalog.pg_settings;
  View pg_catalog.pg_settings
   Column   |  Type   | Modifiers 
+-+---
 name   | text| 
 setting| text| 
 unit   | text| 
 category   | text| 
 short_desc | text| 
 extra_desc | text| 
 context| text| 
 vartype| text| 
 source | text| 
 min_val| text| 
 max_val| text| 
 enumvals   | text[]  | 
 boot_val   | text| 
 reset_val  | text| 
 sourcefile | text| 
 sourceline | integer | 
View definition:
 SELECT a.name, a.setting, a.unit, a.category, a.short_desc, a.extra_desc, 
a.context, a.vartype, a.source, a.min_val, a.max_val, a.enumvals, a.boot_val, 
a.reset_val, a.sourcefile, a.sourceline
   FROM pg_show_all_settings() a(name, setting, unit, category, short_desc, 
extra_desc, context, vartype, source, min_val, max_val, enumvals, boot_val, 
reset_val, sourcefile, sourceline);
Rules:
 pg_settings_n AS
ON UPDATE TO pg_settings DO INSTEAD NOTHING
 pg_settings_u AS
ON UPDATE TO pg_settings
   WHERE new.name = old.name DO  SELECT set_config(old.name, new.setting, 
false) AS set_config


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Is max connections in a table somewhere?

2011-08-10 Thread Andy Colson

On 8/10/2011 1:49 PM, Guillaume Lelarge wrote:

On Wed, 2011-08-10 at 13:41 -0500, Andy Colson wrote:

On 8/10/2011 1:47 PM, Geoffrey Myers wrote:

Is max connections in any table in the database I can access?


Not really a table, but it is selectable:

show max_connections;

use show all to see everything.



Actually, it's also available in a table (pg_settings).




Well thats cool, I did not realize there was a table.

-Andy

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Is max connections in a table somewhere?

2011-08-10 Thread Geoffrey Myers

Scott Marlowe wrote:

On Wed, Aug 10, 2011 at 12:47 PM, Geoffrey Myers
li...@serioustechnology.com wrote:

Is max connections in any table in the database I can access?


No it's in the postgresql.conf file, which is in various places
depending on how pg was installed.  for debian / ubuntu it's in
/etc/postgresql/8.x/main for the default cluster.  It's in
/var/lib/pgsql/data for RHEL 5.  Not sure about other distros.


Yeah, I knew it was in the postgresql.conf file, but since I've got a 
piece of code that's already connected to the database, I figured I'd 
get it from the database, rather then open the file and read it from there.


--
Geoffrey Myers
Myers Consulting Inc.
770.592.1651

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Is max connections in a table somewhere?

2011-08-10 Thread Adrian Klaver
On Wednesday, August 10, 2011 11:47:25 am Geoffrey Myers wrote:
 Is max connections in any table in the database I can access?

SELECT current_setting('max_connections');
 current_setting 
-
 100

-- 
Adrian Klaver
adrian.kla...@gmail.com

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general