Re: [HACKERS] often PREPARE can generate high load (and sometimes minutes long unavailability)

2014-02-25 Thread Pavel Stehule
Hello 2014-02-24 21:31 GMT+01:00 Jeff Janes jeff.ja...@gmail.com: On Mon, Feb 24, 2014 at 7:02 AM, Pavel Stehule pavel.steh...@gmail.comwrote: 2014-02-23 21:32 GMT+01:00 Andres Freund and...@2ndquadrant.com: Hi, On 2014-02-23 20:04:39 +0100, Pavel Stehule wrote: There is relative

Re: [HACKERS] often PREPARE can generate high load (and sometimes minutes long unavailability)

2014-02-25 Thread Pavel Stehule
2014-02-25 11:29 GMT+01:00 Pavel Stehule pavel.steh...@gmail.com: Hello 2014-02-24 21:31 GMT+01:00 Jeff Janes jeff.ja...@gmail.com: On Mon, Feb 24, 2014 at 7:02 AM, Pavel Stehule pavel.steh...@gmail.comwrote: 2014-02-23 21:32 GMT+01:00 Andres Freund and...@2ndquadrant.com: Hi, On

Re: [HACKERS] often PREPARE can generate high load (and sometimes minutes long unavailability)

2014-02-24 Thread Pavel Stehule
2014-02-23 21:32 GMT+01:00 Andres Freund and...@2ndquadrant.com: Hi, On 2014-02-23 20:04:39 +0100, Pavel Stehule wrote: There is relative few very long ProcArrayLocks lwlocks This issue is very pathologic on fast computers with more than 8 CPU. This issue was detected after migration

Re: [HACKERS] often PREPARE can generate high load (and sometimes minutes long unavailability)

2014-02-24 Thread Andres Freund
On 2014-02-23 20:04:39 +0100, Pavel Stehule wrote: 354246.00 93.0% s_lock /usr/lib/postgresql/9.2/bin/postgres 10503.00 2.8% LWLockRelease /usr/lib/postgresql/9.2/bin/postgres 8802.00 2.3% LWLockAcquire /usr/lib/postgresql/9.2/bin/postgres

Re: [HACKERS] often PREPARE can generate high load (and sometimes minutes long unavailability)

2014-02-24 Thread Pavel Stehule
2014-02-24 16:09 GMT+01:00 Andres Freund and...@2ndquadrant.com: On 2014-02-23 20:04:39 +0100, Pavel Stehule wrote: 354246.00 93.0% s_lock /usr/lib/postgresql/9.2/bin/postgres 10503.00 2.8% LWLockRelease /usr/lib/postgresql/9.2/bin/postgres 8802.00

Re: [HACKERS] often PREPARE can generate high load (and sometimes minutes long unavailability)

2014-02-24 Thread Jeff Janes
On Mon, Feb 24, 2014 at 7:02 AM, Pavel Stehule pavel.steh...@gmail.comwrote: 2014-02-23 21:32 GMT+01:00 Andres Freund and...@2ndquadrant.com: Hi, On 2014-02-23 20:04:39 +0100, Pavel Stehule wrote: There is relative few very long ProcArrayLocks lwlocks This issue is very pathologic

[HACKERS] often PREPARE can generate high load (and sometimes minutes long unavailability)

2014-02-23 Thread Pavel Stehule
Hello I got a example of code, that generate relatively high load with minimal connections. This code is +/- bad - it repeatedly generate prepare statement, but somewhere uses prepared statements as protections against SQL injections and they can use same use case. Pseudocode (I can send a test

Re: [HACKERS] often PREPARE can generate high load (and sometimes minutes long unavailability)

2014-02-23 Thread Jeff Janes
On Sun, Feb 23, 2014 at 11:04 AM, Pavel Stehule pavel.steh...@gmail.comwrote: Hello I got a example of code, that generate relatively high load with minimal connections. This code is +/- bad - it repeatedly generate prepare statement, but somewhere uses prepared statements as protections

Re: [HACKERS] often PREPARE can generate high load (and sometimes minutes long unavailability)

2014-02-23 Thread Pavel Stehule
2014-02-23 20:35 GMT+01:00 Jeff Janes jeff.ja...@gmail.com: On Sun, Feb 23, 2014 at 11:04 AM, Pavel Stehule pavel.steh...@gmail.comwrote: Hello I got a example of code, that generate relatively high load with minimal connections. This code is +/- bad - it repeatedly generate prepare

Re: [HACKERS] often PREPARE can generate high load (and sometimes minutes long unavailability)

2014-02-23 Thread Pavel Stehule
2014-02-23 20:35 GMT+01:00 Jeff Janes jeff.ja...@gmail.com: On Sun, Feb 23, 2014 at 11:04 AM, Pavel Stehule pavel.steh...@gmail.comwrote: Hello I got a example of code, that generate relatively high load with minimal connections. This code is +/- bad - it repeatedly generate prepare

Re: [HACKERS] often PREPARE can generate high load (and sometimes minutes long unavailability)

2014-02-23 Thread Andres Freund
Hi, On 2014-02-23 20:04:39 +0100, Pavel Stehule wrote: There is relative few very long ProcArrayLocks lwlocks This issue is very pathologic on fast computers with more than 8 CPU. This issue was detected after migration from 8.4 to 9.2. (but tested with same result on 9.0) I see it on