Re: [GENERAL] Need suggestion

2011-06-04 Thread Esmin Gracic
*(or files if you organize it that way)* if the problem was so simple, I guess Carl would not have asked the question in the first place. there could be one sqlite db file for each day, week or month (1TB over 365 days). Something like partitioning on date dimension. Actually, sqlite scales well

[GENERAL] Pl/pgsql function

2011-06-04 Thread Nick Raj
I am implementing some pl/pgsql functions. Is there any way to change the input for example- I got some value by $1. I want to modify this value (means split that value), Can we do this and how? Second thing, Suppose i defined a function test as select test('geom',the_geom,time) from tablename

[GENERAL] Converting an hstore into a key/value record

2011-06-04 Thread Jon Smark
Hallo, Suppose I have the following 'scores_t' record: create type scores_t as (item text, score int); What's the cleanest way of converting a hstore into a set of scores_t, with each key mapping to field 'item', and the value to field 'score'? As an example, consider the following

Re: [GENERAL] Pl/pgsql function

2011-06-04 Thread Rob Sargent
Nick Raj wrote: I am implementing some pl/pgsql functions. Is there any way to change the input for example- I got some value by $1. I want to modify this value (means split that value), Can we do this and how? Second thing, Suppose i defined a function test as select

Re: [GENERAL] Pl/pgsql function

2011-06-04 Thread David Johnston
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Nick Raj Sent: Saturday, June 04, 2011 10:04 AM To: pgsql-general@postgresql.org Subject: [GENERAL] Pl/pgsql function Second thing, Suppose i defined a function test as select

Re: [GENERAL] Why are IDLE connections using cpu according to TOP.

2011-06-04 Thread Tom Lane
Scott Marlowe scott.marl...@gmail.com writes: On Fri, Jun 3, 2011 at 3:15 PM, bubba postgres bubba.postg...@gmail.com wrote: I have an overloaded DB and I see several IDLE connections that are using significant CPU.. (Not Idle in transaction) Why would an idle process be eating so much cpu?

[GENERAL] recommendations on storage, fairly low-end

2011-06-04 Thread Scott Ribe
- RAID 1 with fairly ordinary (7200RPM) SATA drives has been working fine performance-wise (helped by the battery-backed cache on the RAID controller) and it will continue to be fine for the growth we expect. - The RAID card's driver bugs battery conditioning glitches have been problematic

[GENERAL] Tuning for a tiny database

2011-06-04 Thread CSS
Hello, I couldn't find much information in the archives on this -- perhaps this is a bit of a specialized need, but I was hoping for some input from some experienced pgsql admins. I'm moving some DNS servers from djbdns/tinydns to PowerDNS. While it supports many backends, postgres seems like