Re: [PERFORM] New server setup

2013-03-14 Thread David Boreham
On 3/14/2013 3:37 PM, Mark Kirkwood wrote: I not convinced about the need for BBU with SSD - you *can* use them without one, just need to make sure about suitable longevity and also the presence of (proven) power off protection (as discussed previously). It is worth noting that using unproven o

Re: [PERFORM] New server setup

2013-03-14 Thread Mark Kirkwood
On 15/03/13 11:34, Bruce Momjian wrote: I don't think any drive that corrupts on power-off is suitable for a database, but for non-db uses, sure, I guess they are OK, though you have to be pretty money-constrainted to like that tradeoff. Agreed - really *all* SSD should have capacitor (or equ

Re: [PERFORM] New server setup

2013-03-14 Thread Bruce Momjian
On Fri, Mar 15, 2013 at 10:37:55AM +1300, Mark Kirkwood wrote: > On 15/03/13 07:54, Bruce Momjian wrote: > >Only use SSDs with a BBU cache, and don't set SSD caches to > >write-through because an SSD needs to cache the write to avoid wearing > >out the chips early, see: > > > > http://momjian.u

Re: [PERFORM] New server setup

2013-03-14 Thread Mark Kirkwood
On 15/03/13 10:37, Mark Kirkwood wrote: Also, in terms of performance, the faster PCIe SSD do about as well by themselves as connected to a RAID card with BBU. Sorry - I meant to say "the faster **SAS** SSD do...", since you can't currently plug PCIe SSD into RAID cards (confusingly, some

Re: [PERFORM] New server setup

2013-03-14 Thread Mark Kirkwood
On 15/03/13 07:54, Bruce Momjian wrote: Only use SSDs with a BBU cache, and don't set SSD caches to write-through because an SSD needs to cache the write to avoid wearing out the chips early, see: http://momjian.us/main/blogs/pgblog/2012.html#August_3_2012 I not convinced about the ne

Re: [PERFORM] Speed of EXCECUTE in PL/PGSQL

2013-03-14 Thread Andrew Dunstan
On 03/14/2013 03:22 PM, Artur Zając wrote: Why speed of executing (or planning) some very simple query from string in pl/pgsql is dependent from whole query or why “FOR r IN EXECUTE q” is significally slower from “FOR r IN query”? The whole point of EXECUTE is that it's reparsed and plan

Re: [PERFORM] Speed of EXCECUTE in PL/PGSQL

2013-03-14 Thread Merlin Moncure
On Thu, Mar 14, 2013 at 2:22 PM, Artur Zając wrote: > Hi, > > > > I have PostgreSQL 9.0.12 on Windows. > > > > I have some simple function: > > > > CREATE OR REPLACE FUNCTION sfunction() RETURNS BOOL AS > > $BODY$ > > DECLARE > > q TEXT; > > r RECORD; > > BEGIN > > q='SELECT 1 from tb_klient LIM

[PERFORM] Speed of EXCECUTE in PL/PGSQL

2013-03-14 Thread Artur Zając
Hi, I have PostgreSQL 9.0.12 on Windows. I have some simple function: CREATE OR REPLACE FUNCTION sfunction() RETURNS BOOL AS $BODY$ DECLARE q TEXT; r RECORD; BEGIN q='SELECT 1 from tb_klient LIMIT 0'; FOR r IN EXECUTE q LOOP END LOOP; RETURN NULL; RETURN NUL

Re: [PERFORM] New server setup

2013-03-14 Thread Bruce Momjian
On Tue, Mar 12, 2013 at 09:41:08PM +, Gregg Jaskiewicz wrote: > On 10 March 2013 15:58, Greg Smith wrote: > > On 3/1/13 6:43 AM, Niels Kristian Schjødt wrote: > > Hi, I'm going to setup a new server for my postgresql database, and I > am considering one of these: http://w

Re: [PERFORM] PostgreSQL 9.2.3 performance problem caused Exclusive locks

2013-03-14 Thread Emre Hasegeli
On Thu, 14 Mar 2013 06:53:55 +0200, Jeff Janes wrote: On Friday, March 8, 2013, Emre Hasegeli wrote: PostgreSQL writes several following logs during the problem which I never saw before 9.2.3: LOG: process 4793 acquired ExclusiveLock on extension of relation 305605 of database 16396 af