[SQL] more than 1000 connections

2008-08-05 Thread Jorge Medina
hi guys

I know this list it's about SQL, but if somebody have a pgsql engine
with 1000 or more concurrent connections please show me the
postgresql.conf or if the pgpool work as a solution to this problem.

thanks.

-- 
Jorge Andrés Medina Oliva.
Evolve or die!

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


Re: [SQL] more than 1000 connections

2008-08-05 Thread Richard Broersma
On Tue, Aug 5, 2008 at 8:14 AM, Jorge Medina <[EMAIL PROTECTED]> wrote:

> I know this list it's about SQL, but if somebody have a pgsql engine
> with 1000 or more concurrent connections please show me the
> postgresql.conf or if the pgpool work as a solution to this problem.

The PG performance list would probably be the best mailing list for
this question.  But from previous discussions there is a test
conducted by Sun using postgresql.  They were able to produce 843 JOPS
(which I think means 843 concurrent java operations per seconds) using
a mid-grade server hardware.  All of the postgresql.conf options are
shown as well as the compiler options used to build postgresql.

http://www.spec.org/jAppServer2004/results/res2007q3/jAppServer2004-20070703-00073.html

I hope this helps.

-- 
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

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


Re: [SQL] How to change a view's owner in postgres(is it possible?)

2008-08-05 Thread Richard Broersma
On Fri, Aug 1, 2008 at 3:16 AM, Anoop G <[EMAIL PROTECTED]> wrote:

> We can change the owner of a tbale like this
> alter table tbl_year_end owner to anoop;
> Is it possible to change the owner name of a  view through sql?


Here is what the "notes:" section of
http://www.postgresql.org/docs/8.3/interactive/sql-alterview.html
says:

Notes
Some variants of ALTER TABLE can be used with views as well; for
example, to rename a view it is also possible to use ALTER TABLE
RENAME. To change the schema or owner of a view, you currently must
use ALTER TABLE.


So you would simple use the ALTER TABLE statement to perform this operation.

-- 
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

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


[SQL] Single Quote in tsquery

2008-08-05 Thread Ryan Wallace
Hi all,

I am trying to perform a full text search for the word 'ksan (which starts with 
a quote). After much frustration and syntax errors I stumbled upon the 
following statement which seems to work:

select *
from items
where to_tsvector(name) @@ to_tsquery(E'[\']ksan')

I would like to know if this is actually the correct way to search for this 
word? The use of brackets isn't documented anywhere that I can find so I'm not 
sure if it is even doing what I want it to do or if the correct result is just 
a coincidence.

Thanks,
Ryan


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


[SQL] composite type cast and select statement

2008-08-05 Thread Yura Gal
I would like to get effect of selecting table record when construct a
composite type.

CREATE TYPE "chains"."foo" AS (
 id INTEGER,
 bar INTEGER
);

CREATE OR REPLACE FUNCTION construct_foo(INTEGER,INTEGER) RETURNS
chains.foo AS $$
DECLARE
 f chains.foo;
BEGIN
 f.id := $1;
 f.bar := $2;
 RETURN f;
END;
$$ LANGUAGE 'plpgsql';

SELECT * FROM construct_foo(10,20);
idbar
1020

However I do not like idea to write a function similar to
"construct_foo" for each composite type I have.
I tried to solve this problem through selection of composite type
literal input, and I got following:

SELECT '(10,20)'::chains.foo;
foo
(10,20)

The only query I got desirable result is:
SELECT (t.foo).* FROM(SELECT '(10,20)'::chains.foo) t;
idbar
1020

Is there a way to obtain the same result without use of the nested query?

--
Best regards. Yuri.
mailto: [EMAIL PROTECTED]

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


Re: [SQL] more than 1000 connections

2008-08-05 Thread Richard Broersma
On Tue, Aug 5, 2008 at 12:11 PM, Jorge Medina <[EMAIL PROTECTED]> wrote:

> ok, so I think if can not increment the max_connections to 1000
> because my  main memory it's 2G some test with max connections allowed
> ?

Sorry I don't understand your question.  Also, don't forget to
reply-all so that everyone on the list can participate.


-- 
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

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


Re: [SQL] more than 1000 connections

2008-08-05 Thread Craig Ringer
Jorge Medina wrote:
> hi guys
> 
> I know this list it's about SQL, but if somebody have a pgsql engine
> with 1000 or more concurrent connections please show me the
> postgresql.conf or if the pgpool work as a solution to this problem.

Out of interest - why 1000 connections?

Do you really expect to have 1000 jobs concurrently active and doing
work? If you don't, then you'll be wasting resources and slowing things
down for no reason. There is a connection overhead in PostgreSQL - IIRC
mostly related to database-wide locking and synchronization, but also
some memory for each backend - that means you probably shouldn't run
vastly more backends than you intend to have actively working.

If you described your problem, perhaps someone could give you a useful
answer. Your mention of pgpool suggests that you're probably using a web
app and running into connection count limits, but I shouldn't have to
guess that.

--
Craig Ringer

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