[GENERAL] Another RAID controller recommendation question

2011-06-18 Thread David Boreham
We're looking to deploy a bunch of new machines. Our DB is fairly small and write-intensive. Most of the disk traffic is PG WAL. Historically we've avoided RAID controllers for various reasons, but this new deployment will be done with them (also for various reasons ;) We like to use

Re: [GENERAL] ncoding Table Name and Filed Name

2011-06-18 Thread Vikram A
Hi Mr. David, Thanks for the comment. I understood, its more difficult to mange the schema; when schema itself written in jig jack.  Vikram From: David Johnston pol...@yahoo.com To: 'Vikram A' vikkiatb...@yahoo.in Cc: pgsql-general@postgresql.org Sent: Friday,

Re: [GENERAL] Another RAID controller recommendation question

2011-06-18 Thread Greg Smith
On 06/18/2011 02:46 AM, David Boreham wrote: We're looking to deploy a bunch of new machines. Our DB is fairly small and write-intensive. Most of the disk traffic is PG WAL. Historically we've avoided RAID controllers for various reasons, but this new deployment will be done with them (also for

[GENERAL] Standby server does not start with base backup

2011-06-18 Thread Sanjay Rao
Hi, I am running a test setup for verifying the warm standby feature in Postgres 9.0 release. Both my Master (Win 7 Professional, 64 bit) Standby (Win 7 Professional, 64 bit) machines are having Postgres 9.0 (postgresql-9.0.4-1-windows) installed both are in our LAN environment. After

[GENERAL] While converting the Master to Standby , FATAL: timeline 2 of the primary does not match recovery target timeline 1

2011-06-18 Thread Nithya Rajendran
Hi, We are doing Master/Standby setup, We unplugged the master server, then the standby server became the master (by creating trigger file). While converting the old master to new slave server, We are getting the following error in old master, FATAL: the database system is starting up FATAL:

Re: [GENERAL] interval hour to minute or interval day to minute

2011-06-18 Thread Noah Misch
On Thu, Jun 16, 2011 at 06:07:50PM -0400, Bruce Momjian wrote: Noah Misch wrote: On Sun, Apr 17, 2011 at 04:55:51PM +0100, Jack Douglas wrote: I discovered the 'fields' option of 'interval', but i can't figure out from the docs how it is supposed to work. Are hour to minute and day

Re: [GENERAL] Standby server does not start with base backup

2011-06-18 Thread Magnus Hagander
On Sat, Jun 18, 2011 at 10:57, Sanjay Rao s...@noida.interrasystems.com wrote: Hi, I am running a test setup for verifying the warm standby feature in Postgres 9.0 release. Both my Master (Win 7 Professional, 64 bit) Standby (Win 7 Professional, 64 bit) machines are having Postgres 9.0

Re: [GENERAL] Functional dependencies

2011-06-18 Thread Alpha Beta
Thanks! 2011/6/14 Darren Duncan dar...@darrenduncan.net Alpha Beta wrote: Hi list, (newbie with databases) I was looking out in net about how can we determine or find all functional dependencies in a relational database, but didn't find. So can please anyone here tell me if functional

Re: [GENERAL] 2 questions re RAID

2011-06-18 Thread Scott Ribe
On Jun 17, 2011, at 11:23 PM, Greg Smith wrote: I guess you could call Highpoint a RAID manufacturer, but I wouldn't do so. They've released so many terrible problems over the years that it's hard to take the fact that they may have something reasonable you can buy now (the 43XX cards I

Re: [GENERAL] While converting the Master to Standby , FATAL: timeline 2 of the primary does not match recovery target timeline 1

2011-06-18 Thread Greg Smith
On 06/18/2011 05:22 AM, Nithya Rajendran wrote: We are doing Master/Standby setup, We unplugged the master server, then the standby server became the master (by creating trigger file). While converting the old master to new slave server, We are getting the following error in old master,

Re: [GENERAL] set returning function with variable argument - possible?

2011-06-18 Thread Frank Miles
On Thu, 16 Jun 2011, David Johnston wrote: The only way to feed another relation into a function is to place the function in the SELECT list. If you then want to expand the result of the function call you alias the function result and then .* against it. WITH feeder AS ( SELECT f(var) AS

[GENERAL] Search for lists

2011-06-18 Thread Daron Ryan
Hello, I need to search a table to find sets of rows that have a column matching itself for the whole set and another column matching row for row with a list I am going to supply. The result I should receive should be value of the column that matches itself. For example given the following

Re: [GENERAL] Search for lists

2011-06-18 Thread David Johnston
Untested approach Use array_agg on column 2 along with group by on column 1 to build check arrays and then use equals to compare with an array of your desired input values. You should omit duplicates and order ascending both the data and the input to ensure you are matching canonical forms.

Re: [GENERAL] Search for lists

2011-06-18 Thread David Johnston
An alternative approach would be to select using a IN condition on the where clause and group by column 1 and column 2. Then, using this as a sub-select group by the resultant column 1 and a count on column two. The matching identifiers are those with a count equal to the number of entries in

[GENERAL] fill factor guestimate

2011-06-18 Thread Dave Thompson
Hi, I have a table that will be updated frequently. Each row will be updated at least once during it's lifetime, and most rows will be updated ~10 times in their first 2 weeks of existence, and then relatively rarely after that. The rows are being updated by a prepared statement that gets

[GENERAL] Referencing function value inside CASE..WHEN

2011-06-18 Thread lover boi
Hi, In the following statement, does the custom function get executed twice? SELECT MY_FUNCTION(...), CASE WHEN MY_FUNCTION(...) = '...' THEN '...' ELSE '...' END ... ... If so, is there a way I can make it execute once? I tried this but it gave me a Column my_function does not exist

Re: [GENERAL] fill factor guestimate

2011-06-18 Thread Scott Marlowe
On Sat, Jun 18, 2011 at 6:12 PM, Dave Thompson dthomp...@gmail.com wrote: Hi, I have a table that will be updated frequently. Each row will be updated at least once during it's lifetime, and most rows will be updated ~10 times in their first 2 weeks of existence, and then relatively rarely

[GENERAL] Referencing function value inside CASE..WHEN

2011-06-18 Thread lover boi
Hi, In the following statement, does the custom function get executed twice? SELECT MY_FUNCTION(...), CASE WHEN MY_FUNCTION(...) = '...' THEN '...' ELSE '...' END ... ... If so, is there a way I can make it execute once? I tried this but it gave me a Column my_function does not exist

[GENERAL] Port forwarding via iptables to postgres listening locally

2011-06-18 Thread David Resnick
Hi, I have a posgres instance configured to listen at the localhost default. I'm trying to enable port forwarding via iptables. I set up the following rule: iptables -t nat -I PREROUTING --source 0/0 --destination 0/0 -p tcp --dport 5432 -j REDIRECT and can see that it is redirecting packets

Re: [GENERAL] Referencing function value inside CASE..WHEN

2011-06-18 Thread David Johnston
You can try using a CTE/With clause. Failing that use a function with SELECT INTO... On Jun 18, 2011, at 22:45, lover boi lover-...@live.co.uk wrote: Hi, In the following statement, does the custom function get executed twice? SELECT MY_FUNCTION(...), CASE WHEN MY_FUNCTION(...) =

Re: [GENERAL] Search for lists

2011-06-18 Thread Daron Ryan
Thanks. On 19/06/2011 8:09 AM, David Johnston wrote: An alternative approach would be to select using a IN condition on the where clause and group by column 1 and column 2. Then, using this as a sub-select group by the resultant column 1 and a count on column two. The matching identifiers