Re: Write workload is causing severe slowdown in Production

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 22, 2012 at 10:13 AM, Kevin Grittner
<Kevin.Grittner@xxxxxxxxxxxx> wrote:
> In particular, I recommend that you *never* leave transactions open
> or hold locks while waiting for user response or input.  They *will*
> answer phone calls or go to lunch with things pending, potentially
> blocking other users for extended periods.

This -- transactions aren't meant to intentionally block users but to
allow you to ensure data remains in a valid state in the face of
concurrent activity.  In-transaction locks should be as short as
possible while still giving those guarantees and should hopefully
never be user facing.  If you want user controlled locks, they should
be cooperative and non transactional -- advisory locks.

http://www.postgresql.org/docs/current/static/explicit-locking.html#ADVISORY-LOCKS

merlin

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux