Re: Write workload is causing severe slowdown in Production

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: gnanam(at)zoniac(dot)com, pgsql-performance(at)postgresql(dot)org
Subject: Re: Write workload is causing severe slowdown in Production
Date: 2012-03-22 16:18:43
Message-ID: CAHyXU0xyVixmLdiMaD2wUU6DgN2AiXi1_Avm+k7vB49BFYEPPA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, Mar 22, 2012 at 10:13 AM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> 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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Sebastian Melchior 2012-03-22 22:52:49 Sudden Query slowdown on our Postgresql Server
Previous Message Kevin Grittner 2012-03-22 15:13:45 Re: Write workload is causing severe slowdown in Production