Re: [GENERAL] Bug in postgres 9.2 installation: pg_archivecleanup: command not found

2012-12-03 Thread Guillaume Lelarge
On Sun, 2012-12-02 at 08:09 -0800, rahul143 wrote: > I have installed postgres 9.2 on ubuntu 12.04 like this: > > sudo add-apt-repository ppa:pitti/postgresql > sudo apt-get update > sudo apt-get install postgresql-9.2 > > However after this, i get the following error: > > 2012-11-12 17:49:38 GM

Re: [GENERAL] Bug in postgres 9.2 installation: pg_archivecleanup: command not found

2012-12-03 Thread John R Pierce
On 12/3/2012 12:07 AM, Guillaume Lelarge wrote: This is a contrib program, so you need to install the contrib package on your system. very odd that an "apt-get install postgresql-9.2" would have a dependency on a contrib module. -- Sent via pgsql-general mailing list (pgsql-general@postg

Re: [GENERAL] execute if statement

2012-12-03 Thread Jasen Betts
On 2012-12-01, Peter Kroon wrote: > --f46d043be1f4bd2dec04cfcfbd6a > Content-Type: text/plain; charset=ISO-8859-1 > > M... > > How do I execute dynamic sql that starts with an if statement. "if" is not SQL. > I'm converting mssql code to pgsql. probably best to rewrite at a higher level

Re: [GENERAL] execute if statement

2012-12-03 Thread John R Pierce
On 12/1/2012 11:59 AM, Peter Kroon wrote: I do not wish to create a function for each query I have. query's aren't IF statements. SELECT stuff FROM table WHERE conditions ;<= thats a query. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] Postgres PHP error

2012-12-03 Thread Albe Laurenz
rahul143 wrote: > Im receiving the following error, on a php page, conneting to postgres 7.4, > installed on Mandrake 10.0 > > Error Description: pg_connect(): Unable to connect to PostgreSQL server: > FATAL: sorry, too many clients already . > > Can anyone tell me what this means? > Is there a p

Re: [GENERAL] guids / bytea and index use ?

2012-12-03 Thread Albe Laurenz
rahul143 wrote: > We are currently using a 32byte varchar for our primary keys. We tried to > reduce this down to 16 bytes but varchar didn’t seem to store this > correctly. I’d like to use bytea instead so we could use 16bytes, but are > indexes used properly ? Does anyone have any other suggestio

Re: MODERATOR WARNING Re: [GENERAL] Exception Handling in C-Language Functions?

2012-12-03 Thread David Fetter
OK :) Is there a way to do this automatically? Cheers, David. On Mon, Dec 03, 2012 at 03:14:54AM -0300, Alvaro Herrera wrote: > MODERATOR WARNING > > I noticed that this guy Rahul seems to be reinjecting old list emails > somehow. Please don't approve anything coming from him. Observe this > e

Re: [GENERAL] query performance, though it was timestamps,maybe just table size?

2012-12-03 Thread Henry Drexler
On Sun, Dec 2, 2012 at 12:44 AM, Jeff Janes wrote: > Could you do it for the recursive > SQL (the one inside the function) like you had previously done for the > regular explain? > > Cheers, > > Jeff > Here they are: for the 65 million row table: "Index Scan using ctn_source on massive (cost=0

Re: [GENERAL] query performance, though it was timestamps,maybe just table size?

2012-12-03 Thread Henry Drexler
On Sun, Dec 2, 2012 at 12:44 AM, Jeff Janes wrote: > Could you do it for the recursive > SQL (the one inside the function) like you had previously done for the > regular explain? > > Cheers, > > Jeff > Here they are: for the 65 million row table: "Index Scan using ctn_source on massive (cost=0

Re: [GENERAL] High SYS CPU - need advise

2012-12-03 Thread Merlin Moncure
On Sun, Dec 2, 2012 at 9:08 AM, rahul143 wrote: > Hello everyone, > > I'm seeking help in diagnosing / figuring out the issue that we have with > our DB server: > > Under some (relatively non-heavy) load: 300...400 TPS, every 10-30 seconds > server drops into high cpu system usage (90%+ SYSTEM acr

Re: [GENERAL] Exception Handling in C-Language Functions?

2012-12-03 Thread Merlin Moncure
On Sun, Dec 2, 2012 at 11:18 PM, rahul143 wrote: > I have the created a C-Language function (code is below). Now, I > wonder: How do I handle exceptions, for example if malloc cannot assign > the necessary memory? Do "palloc" and "pfree" handle such a case > cleanly? Should I simply use an "ass

Re: [GENERAL] High SYS CPU - need advise

2012-12-03 Thread Alvaro Herrera
Merlin Moncure escribió: > Didn't we just discuss this exact problem on the identically named > thread? > http://postgresql.1045698.n5.nabble.com/High-SYS-CPU-need-advise-td5732045.html Ignore this guy. It's a bot reinjecting old messages, or something like that, probably because of some bug i

[GENERAL] Strange Connection Problem….

2012-12-03 Thread Jerry LeVan
Hi, I recently modified one of my Fedora boxes by changing it's name and ip. I also disabled the internal wifi ( connection speed was dropping to 1 mb/sec ) and configured a USB wifi stick ( wow 270~300 mb/sec ). As I checked out the refurbed box networking was ok and I was able to connect to P

Re: [GENERAL] function

2012-12-03 Thread Raymond O'Donnell
On 30/11/2012 10:25, AZL . wrote: > > write a select query and take each row values and do some update or > insert task postgresql 9.1, can any one give a template of function > syntax for implementing such a task You're probably looking for a with...loop construct in plpgsql: http://www.postgre

Re: [GENERAL] function

2012-12-03 Thread Raymond O'Donnell
On 03/12/2012 16:55, Raymond O'Donnell wrote: > On 30/11/2012 10:25, AZL . wrote: >> >> write a select query and take each row values and do some update or >> insert task postgresql 9.1, can any one give a template of function >> syntax for implementing such a task > > You're probably looking for

Re: [GENERAL] Postgres PHP error

2012-12-03 Thread Steve Crawford
On 12/02/2012 09:18 PM, rahul143 wrote: Hi All Im receiving the following error, on a php page, conneting to postgres 7.4, installed on Mandrake 10.0 Error Description: pg_connect(): Unable to connect to PostgreSQL server: FATAL: sorry, too many clients already . Can anyone tell me what this m

Re: [GENERAL] Postgres PHP error

2012-12-03 Thread Richard Huxton
On 03/12/12 05:18, rahul143 wrote: Hi All Im receiving the following error, on a php page, conneting to postgres 7.4, installed on Mandrake 10.0 Others have answered your question. However... Please make sure you have regular scheduled backups for that database. That is quite an old (9 year

Re: [GENERAL] Postgres PHP error

2012-12-03 Thread Alvaro Herrera
Richard Huxton escribió: > On 03/12/12 05:18, rahul143 wrote: > >Hi All > > > >Im receiving the following error, on a php page, conneting to postgres 7.4, > >installed on Mandrake 10.0 > > > > Others have answered your question. However... As I noted elsewhere, please ignore this guy. He's a bot

Re: [GENERAL] Postgres PHP error

2012-12-03 Thread Michael Paquier
On Mon, Dec 3, 2012 at 2:18 PM, rahul143 wrote: > Hi All > > Im receiving the following error, on a php page, conneting to postgres 7.4, > installed on Mandrake 10.0 > > Error Description: pg_connect(): Unable to connect to PostgreSQL server: > FATAL: sorry, too many clients already . > > Can a