Re: [GENERAL] Memcached for Database server

2011-05-19 Thread Craig Ringer
On 20/05/11 13:00, Adarsh Sharma wrote: > Thanks Craig, > > I spend some time on Memcahced and your explaination also helps. > I think it is used only for applications where load is very high & users > issue read only queries to the database. Er, yes. You can't really cache queries that write to

Re: [GENERAL] Unique Session ID in PGSQL?

2011-05-19 Thread Merlin Moncure
On Thu, May 19, 2011 at 4:21 AM, Albe Laurenz wrote: > Pavel Stehule wrote: >>> Is there any function in PGSQL that returns an unique Session >>> identifier of the actual session? >>> For example a Bigint, or GUID, or etc? >>> Can I get the living Session identifiers from PG? >> >> try >> >> postg

Re: [GENERAL] ECPG selecting into char arrays

2011-05-19 Thread Bosco Rama
Leif Jensen wrote: > > With that note in mind, how do I select from a table field of type 'text' ? If the type is text and you have no idea how long it will be have ecpg/libpq allocate a buffer for you by using a pointer set to NULL as the variable: exec sql char *val = NULL; /* Use an

Re: [GENERAL] What's eating my space ?

2011-05-19 Thread Eric McKeeth
On Thu, May 19, 2011 at 1:05 AM, Andreas Kretschmer < akretsch...@spamfence.net> wrote: > Georgi Ivanov wrote: > > > Hi, > > I wander what is taking up my space on disk ... > > > > btv=# SELECT pg_size_pretty(pg_database_size('btv_good')); > > pg_size_pretty > > > > 10 GB > > (

Re: [GENERAL] What is the average salary for Postgresql DBA

2011-05-19 Thread Martin Gainty
WashingtonDC-NY corridor is 100k+ greater Boston is averaging 50k. (depends on where you want to go) Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vor

Re: [GENERAL] What is the average salary for Postgresql DBA

2011-05-19 Thread Merlin Moncure
On Thu, May 19, 2011 at 10:32 AM, Vick Khera wrote: > On Thu, May 19, 2011 at 3:42 AM, John R Pierce wrote: >> I suspect H1B ssalaries tend to be somewhat below these levels. >> > > Wouldn't it be unlawful to pay less than you would a permanent > resident/citizen?  Ie, the purpose of H1B is not t

Re: [GENERAL] What is the average salary for Postgresql DBA

2011-05-19 Thread John R Pierce
On 05/19/11 8:32 AM, Vick Khera wrote: On Thu, May 19, 2011 at 3:42 AM, John R Pierce wrote: I suspect H1B ssalaries tend to be somewhat below these levels. Wouldn't it be unlawful to pay less than you would a permanent resident/citizen? Ie, the purpose of H1B is not to find someone cheaper,

Re: [GENERAL] What is the average salary for Postgresql DBA

2011-05-19 Thread Vick Khera
On Thu, May 19, 2011 at 3:42 AM, John R Pierce wrote: > I suspect H1B ssalaries tend to be somewhat below these levels. > Wouldn't it be unlawful to pay less than you would a permanent resident/citizen? Ie, the purpose of H1B is not to find someone cheaper, but someone qualified. -- Sent via p

Re: [GENERAL] Password issue

2011-05-19 Thread hubert depesz lubaczewski
On Thu, May 19, 2011 at 05:53:11PM +0300, Mahmoud wrote: > Hi all > I am trying to create a database by passing arguments to > createdb.exe but createdb always asks me about the password although > I passed -W 123 to it. please check docs for createdb http://www.postgresql.org/docs/current/intera

Re: [GENERAL] Password issue

2011-05-19 Thread Ashesh Vashi
'-W' option is there to prompt the password. Use PGPASSWORD environment variable. http://www.postgresql.org/docs/8.3/static/libpq-envars.html *createdb creates a PostgreSQL database.* * * *Usage:* * createdb [OPTION]... [DBNAME] [DESCRIPTION]* * * *Options:* * -D, --tablespace=TABLESPACE defau

[GENERAL] Password issue

2011-05-19 Thread Mahmoud
Hi all I am trying to create a database by passing arguments to createdb.exe but createdb always asks me about the password although I passed -W 123 to it. How can I override password request? PS This my test for creating the database createdb.exe -U postgres -W 123 -O admin -e test Cheers.

Re: [GENERAL] optimizing a cpu-heavy query

2011-05-19 Thread Tom Lane
Hitoshi Harada writes: > 2011/4/27 Tom Lane : >> Joel Reymont writes: >>> That's a 30x speedup, from 12 minutes down to 38s. Thanks Tom! >> Huh, I would've bet on a lot more actually.  The nodeFunctionscan and >> nodeAgg code must not be as inefficient as it looks on the surface ... > Did you m

[GENERAL] ECPG selecting into char arrays

2011-05-19 Thread Leif Jensen
Hi guys, In version 8.2 of the ECPG documentation, section "31.6.3. Different types of host variables" has been added and includes the following (new) note: 'Note that you have to take care of the length for yourself. If you use this host variable as the target variable of a query which r

Re: [GENERAL] " FATAL: no pg_hba.conf entry for host" messages...

2011-05-19 Thread Jasmin Dizdarevic
Hi, looks like a missing entry in pg_hba.conf for the requesting host. Look here: http://www.postgresql.org/docs/8.2/static/auth-pg-hba-conf.html greets jasmin 2011/5/19 Shafi DBA > Folks, > > > > Customer is getting below messa

Re: [GENERAL] Unexpected exit of Postgres terminal

2011-05-19 Thread Raghavendra
Small change replace all PG path with PPSS paths... --- Best Regards, Raghavendra EnterpriseDB Corporation Blog: http://raghavt.blogspot.com/ On Thu, May 19, 2011 at 4:46 PM, Raghavendra < raghavendra@enterprisedb.com> wrote: > Hi Adarsh, > > This isssue has fixed in PPSS latest version. H

Re: [GENERAL] Unexpected exit of Postgres terminal

2011-05-19 Thread Raghavendra
Hi Adarsh, This isssue has fixed in PPSS latest version. However here is workaround for it. Step 1: Install Libedit module from Yum Repository. [root@239435-db9 ~]# yum install libedit.x86_64 [root@239435-db9 ~]# rpm -q libedit.x86_64 libedit-2.11-2.20080712cvs.el5 Step 2: Identify the locatio

[GENERAL] Unexpected exit of Postgres terminal

2011-05-19 Thread Adarsh Sharma
Dear all, Today I need to use crosstab function but Postgresql says that there is no function crosstab, so i try to install it by : bin/psql -Upostgres test -f '/opt/PostgresPlus/9.0SS/share/postgresql/contrib/tablefunc.sql' & it creates the functions. But know when I issue any query in Po

[GENERAL] " FATAL: no pg_hba.conf entry for host" messages...

2011-05-19 Thread Shafi DBA
Folks, Customer is getting below messages from one of their machines - when connected to the database: beaconinfra3 :124.7.159.110 -- psql: FATAL: no pg_hba.conf entry for host "202.144.77.14", user "root", database "beaconinfra3", SSL off BW_Hosting :124.7.221.25 -- p

[GENERAL] Convert data into horizontal from vertical form

2011-05-19 Thread Adarsh Sharma
Dear all, I am not able to insert data into a table in horizontal form. The data is in below form : A show a small set of data :- *c_id f_name f_value* 2 k1 v1 2 k2 v2 2

Re: [GENERAL] How to do this ?

2011-05-19 Thread Adarsh Sharma
Any update on this. Please guide. Adarsh Sharma wrote: Dear all, I explain in the simple terms : Our application stores data in a format that is not best fitted to analyze. _*Table news *_category_id Record_id field_name field_value

Re: [GENERAL] What is the average salary for Postgresql DBA

2011-05-19 Thread AI Rumman
Thanks buddy. You are quite right. I may work in the system administrator team as a Database Specialist where primary responsibility may be database tuning, replication and backup policy defining etc. On Thu, May 19, 2011 at 1:42 PM, John R Pierce wrote: > On 05/19/11 12:30 AM, Rob Wultsch wrote

Re: [GENERAL] 500KB PDF saving into large object , what is the table size?

2011-05-19 Thread Albe Laurenz
Emi Lu wrote: > A question about large object column type in postgresql8.3. > > A pdf file=500KB. > > If saving into large object column, will the table size be around 500KB? > If larger than 500KB, what could be the proximate size? It should never be noticably bigger than 500K. Yours, Laurenz Al

Re: [GENERAL] question about readonly instances

2011-05-19 Thread Albe Laurenz
Szymon Guz wrote: >>> I've got a question about quite a strange configuration. >>> I was asked if we can have one storage, with one data directory where one >>> postgresql >>> instance writes data, and many other instances read those. >>> Is that possible without any replication and copying data?

Re: [GENERAL] optimizing a cpu-heavy query

2011-05-19 Thread Hitoshi Harada
2011/4/27 Tom Lane : > Joel Reymont writes: >> On Apr 26, 2011, at 5:00 PM, Tom Lane wrote: >>> For another couple orders of magnitude, convert the sub-function to C code. >>>  (I don't think you need >>> a whole data type, just a function that does the scalar product.) > >> That's a 30x speedup,

Re: [GENERAL] Unique Session ID in PGSQL?

2011-05-19 Thread Albe Laurenz
Pavel Stehule wrote: >> Is there any function in PGSQL that returns an unique Session >> identifier of the actual session? >> For example a Bigint, or GUID, or etc? >> Can I get the living Session identifiers from PG? > > try > > postgres=# select pg_backend_pid(); > pg_backend_pid > -

Re: [GENERAL] question about readonly instances

2011-05-19 Thread Craig Ringer
On 05/19/2011 03:25 PM, John R Pierce wrote: I have no idea how expensive it is, but fortunately that's not my problem :) I was only asked about the possibility of running Postgres that way. And by the way: how expensive is that? something like US$23000 per CPU core for the RAC option for Ora

Re: [GENERAL] cycling through custom type fields

2011-05-19 Thread Julius Tuskenis
2011.05.19 10:05, Pavel Stehule rašė: It isn't possible directly Pitty c) use a EXECUTE USING trick http://okbob.blogspot.com/2008/06/execute-using-feature-in-postgresql-84.html I like the example of Tom Lane on triggers... Too bad something tg_argv is unavailable outside of trigger... Thank

Re: [GENERAL] What is the average salary for Postgresql DBA

2011-05-19 Thread John R Pierce
On 05/19/11 12:30 AM, Rob Wultsch wrote: On Wed, May 18, 2011 at 10:52 PM, AI Rumman wrote: Hey guys, If I get H1B visa as Postgresql DBA, then what may I expect to get as my salary? Does anyone have idea on this? Thanks. This topic never gets many replies. I will reply because I am not rea

Re: [GENERAL] What is the average salary for Postgresql DBA

2011-05-19 Thread Rob Wultsch
On Wed, May 18, 2011 at 10:52 PM, AI Rumman wrote: > Hey guys, > > If I get H1B visa as Postgresql DBA, then what may I expect to get as my > salary? > Does anyone have idea on this? > > Thanks. > This topic never gets many replies. I will reply because I am not really part of the community. It

Re: [GENERAL] question about readonly instances

2011-05-19 Thread John R Pierce
I have no idea how expensive it is, but fortunately that's not my problem :) I was only asked about the possibility of running Postgres that way. And by the way: how expensive is that? something like US$23000 per CPU core for the RAC option for Oracle Enterprise. so a 100 node cluster with

Re: [GENERAL] question about readonly instances

2011-05-19 Thread Szymon Guz
On 19 May 2011 09:05, John R Pierce wrote: > On 05/18/11 11:39 PM, Szymon Guz wrote: > >> >> thanks for the answer. It is not a problem to have 3 oracle instances, in >> fact there will be hundreds of them probably, but could also be hundreds of >> Postgres instances :) >> > > do you have any ide

Re: [GENERAL] cycling through custom type fields

2011-05-19 Thread Pavel Stehule
Hello 2011/5/19 Julius Tuskenis : > Hello, > > I would like to ask if there is a possibility in postgresql (v9) to cycle > through the fields of some custom type parameter in plpgsql function. > > I have a type defined: > CREATE TYPE naims.frt_pwd_ed AS >   (pwd_id integer, >    pwd_sub_id integer

Re: [GENERAL] What's eating my space ?

2011-05-19 Thread Andreas Kretschmer
Georgi Ivanov wrote: > Hi, > I wander what is taking up my space on disk ... > > btv=# SELECT pg_size_pretty(pg_database_size('btv_good')); > pg_size_pretty > > 10 GB > (1 row) > > > btv=# SELECT nspname || '.' || relname AS "relation", > pg_size_pretty(pg_total_relation

Re: [GENERAL] question about readonly instances

2011-05-19 Thread John R Pierce
On 05/18/11 11:39 PM, Szymon Guz wrote: thanks for the answer. It is not a problem to have 3 oracle instances, in fact there will be hundreds of them probably, but could also be hundreds of Postgres instances :) do you have any idea how EXPENSIVE 100s of Oracle RAC nodes are annually? to sh